Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master

From: Michael Mauger <[email-masked]>
Date: Wed, 4 Jan 2017 03:16:00 +0000 (UTC)

On Friday, December 30, 2016 1:17 PM, Simen Heggestøyl <[email-masked]> wrote:
>
>This bug seems to be caused by a change I made in
>https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24646, making
>`sql-postgres` able to complete the database name by looking at the
>result of `psql -ltX`.
>
>psql exits with status code 2 if the connection to the server went
>bad, for instance if permissions are missing [1].
>
>I think we can fix this by being more lax in
>`sql-postgres-list-databases`, and just don't provide any completions
>should the command fail. Then we'd also need to change the value of
>the `REQUIRE-MATCH` parameter to `completing-read` on line 2966, since
>requiring a match when there are no completions would make it
>impossible to continue.
>
>What do you think, Michael?
>
>-- Simen
>
>[1] 
>https://www.postgresql.org/docs/current/static/app-psql.html#AEN98634
>

Just got back after the holiday. Makes sense that could be a problem. I'm getting ready to push a change related to completing-read so let me take a look.

Thanks for staying on top of this...

-- 
MICHAEL MAUGER // FSF Member // GNU Emacs sql-mode maintainer // GNU Linux, GNU Emacs