Forum OpenACS Q&A: Re: psql and emacs
< (sql-get-login 'database 'server)
<blockquote> (sql-get-login 'user 'database 'server)
<blockquote> (if (not (string= "" sql-user))
(setq params (append (list "-U" sql-user) params)))
Don't forget to byte compile sql.el afterwards or Emacs will continue to use the old sql.elc without the patch.
* I applied the patch by hand, but I think the lines in the 21.2 patch above is off by 1 - but get to line 1683 and it's around there somewhere
* it only worked for me if the sql-get-login used this specific order:
(sql-get-login 'database 'user 'server)
If I put the 'user anywhere else it ignored it :/
Also, sql-get-login will automatically ask for password when it asks for user - if you are not using passwords just leave it blank and hit enter.
PS: Bart you'll be pleased to know that I got to this thread from the first page of a google search - it's cool because I'm working at a non-oacs client, and I didn't even notice that I was on openacs.org until I saw /Bart :)
I'll be signing off /Mark soon, thus completing all our conversions into Lars-borgs :P