all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Robert <rchar@protonmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: sql and auth-source
Date: Fri, 27 Nov 2020 04:58:56 +0300	[thread overview]
Message-ID: <X8BdYKotIsSorYK/@protected.rcdrun.com> (raw)
In-Reply-To: <JABOufArUVKaDi8BP-DLqze9A6hDs4evNVMTm8jb1O1DspOXNIm8ENdCvhVe7FuS-B4oT9VHLSBMfK-jrRA9wPVCPBAprXxm7XVmVkc1Dc8=@protonmail.com>

* Robert via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2020-11-26 18:20]:
> Hello,
> 
> how to configure the sql mode to work with a wallet file?

> A code example would be very helpful.
> 
> I found function sql-auth-source-search-wallet, but i don't know how to use it.
> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/sql.el#n736

What you configure is .authinfo then how I understand, the sql-mode
would search for user/password and server datails in .authinfo by
using that function. Unless you are programming you need not use that
function. And function is prefixed sql- only because it belongs to sql
mode, not that it is doing any SQL itself.

I have not configured authinfo as I mostly work with local database.

Instead I have configured environment variables:

export PGDATABASE="databasename"
export PGUSER='username'
export PGCLIENTENCODING='UTF8'

You better say what you wish to achieve, do you wish to remember
credentials for remote databases?

File ~/.authinfo is in format:

host localhost port port-number user user-ID password password




  parent reply	other threads:[~2020-11-27  1:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 12:46 sql and auth-source Robert via Users list for the GNU Emacs text editor
2020-11-26 19:49 ` Filipp Gunbin
2020-11-27  1:58 ` Jean Louis [this message]
2020-11-27  6:52   ` Robert
2020-11-27  7:10     ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8BdYKotIsSorYK/@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rchar@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.