help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sql and auth-source


From: Jean Louis
Subject: Re: sql and auth-source
Date: Fri, 27 Nov 2020 04:58:56 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]