GNU bug report logs - #25236
26.0.50; sql-postgres not working on master

Previous Next

Package: emacs;

Reported by: sunshavi <at> fastmail.fm

Date: Tue, 20 Dec 2016 03:32:01 UTC

Severity: normal

Found in version 26.0.50

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25236 in the body.
You can then email your comments to 25236 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Tue, 20 Dec 2016 03:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to sunshavi <at> fastmail.fm:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 20 Dec 2016 03:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: sunshavi <at> fastmail.fm
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; sql-postgres not working on master
Date: Mon, 19 Dec 2016 22:30:25 -0500
Hi.

This is working on 25.1 but not on master compiled toda.

I tried it with with 'emacs -Q'

Regards




In GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2016-12-19 built on caral
System Description:	Arch Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
process-lines: psql exited with status 2
Quit
Configured using:
 'configure '--program-transform-name=s/^ctags$/ctags.emacs/'
 --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=lucid --mandir=/usr/share/man
 --pdfdir=/usr/share/doc/emacs --with-sound --without-gconf --with-xft
 --without-xwidgets --with-gameuser=:games 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fstack-protector-strong'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 LIBSYSTEMD

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: C
  locale-coding-system: nil

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils sql easymenu view thingatpt
comint ansi-color ring cl-loaddefs pcase cl-lib term/xterm xterm
time-date disp-table mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript case-table epa-hook jka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 107196 6967)
 (symbols 48 20913 1)
 (miscs 40 33 121)
 (strings 32 20197 3828)
 (string-bytes 1 673838)
 (vectors 16 12775)
 (vector-slots 8 412029 5278)
 (floats 8 187 568)
 (intervals 56 226 66)
 (buffers 976 11))




Added indication that bug 25236 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Dec 2016 16:50:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Fri, 30 Dec 2016 18:19:02 GMT) Full text and rfc822 format available.

Message #10 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: sunshavi <at> fastmail.fm, Michael Mauger <michael <at> mauger.com>
Cc: 25236 <at> debbugs.gnu.org
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Fri, 30 Dec 2016 19:17:53 +0100
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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Wed, 04 Jan 2017 03:21:02 GMT) Full text and rfc822 format available.

Message #13 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <michael <at> mauger.com>
To: Simen Heggestøyl <simenheg <at> gmail.com>, 
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
Cc: "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Wed, 4 Jan 2017 03:16:00 +0000 (UTC)
On Friday, December 30, 2016 1:17 PM, Simen Heggestøyl <simenheg <at> gmail.com> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Sat, 18 Feb 2017 17:03:02 GMT) Full text and rfc822 format available.

Message #16 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Michael Mauger <michael <at> mauger.com>
Cc: "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Sat, 18 Feb 2017 18:01:55 +0100
[Message part 1 (text/plain, inline)]
On Wed, Jan 4, 2017 at 4:16 AM, Michael Mauger <michael <at> mauger.com> 
wrote:
> 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...

I think the attached patch fixes half of the problem. Then we need to
do something about the `completing-read' to make it possible to still
select a database when `sql-postgres-list-databases' returns nil.

-- Simen
[0001-Handle-non-zero-exit-status-from-psql-more-gracefull.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Thu, 04 May 2017 20:06:02 GMT) Full text and rfc822 format available.

Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):

From: erreina <erreina <at> gmail.com>
To: Bug-gnu-emacs <at> gnu.org
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Thu, 4 May 2017 12:57:32 -0700 (MST)
Hi, any further progress on this? The database name completion is
awesome...but the require match on the database name make it impossible to
continue when working on a remote database server.

Best,
Ernesto



--
View this message in context: http://emacs.1067599.n8.nabble.com/bug-25236-26-0-50-sql-postgres-not-working-on-master-tp416235p426363.html
Sent from the Emacs - Bugs mailing list archive at Nabble.com.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Sat, 29 Jul 2017 16:27:01 GMT) Full text and rfc822 format available.

Message #22 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Michael Mauger <michael <at> mauger.com>
Cc: "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Sat, 29 Jul 2017 18:26:22 +0200
[Message part 1 (text/plain, inline)]
On Wed, Jan 4, 2017 at 4:16 AM, Michael Mauger <michael <at> mauger.com> 
wrote:
> I'm getting ready to push a change related to completing-read so let 
> me take a look.

Hi Michael, any progress on this? Otherwise, does the attached patch
look OK to install? I think it should fix the described problem.

-- Simen
[0001-Handle-non-zero-exit-status-from-psql-more-gracefull.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Sat, 29 Jul 2017 18:50:01 GMT) Full text and rfc822 format available.

Message #25 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: andrés ramírez <rrandresf <at> gmail.com>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: Michael Mauger <michael <at> mauger.com>,
 "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>
Subject: new mail address (was: bug#25236: 26.0.50;
 sql-postgres not working on master)
Date: Sat, 29 Jul 2017 11:15:51 -0600
Hi Simen, Michael.

My fastmail account is going to be closed on 2 days. On the future send
me a copy to this mail address (gmail).

AR




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Mon, 07 Aug 2017 01:13:01 GMT) Full text and rfc822 format available.

Message #28 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <mmauger <at> protonmail.com>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: Michael Mauger <michael <at> mauger.com>,
 "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Sun, 06 Aug 2017 21:01:48 -0400
[Message part 1 (text/plain, inline)]
Sorry for the delay; ADD keeps in a perpetual state of: "what was it that I was doing...?"
I had made the changes locally a while ago, but hedn't pushed them to the reporsity. They are there now. Let me know if you have any issues.
Again, sorry for the delay.

--
MICHAEL MAUGER // FSF and EFF member // GNU Emacs sql.el maintainer

> -------- Original Message --------
> Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
> Local Time: July 29, 2017 12:26 PM
> UTC Time: July 29, 2017 4:26 PM
> From: simenheg <at> gmail.com
> To: Michael Mauger <michael <at> mauger.com>
> sunshavi <at> fastmail.fm <sunshavi <at> fastmail.fm>, 25236 <at> debbugs.gnu.org <25236 <at> debbugs.gnu.org>
> On Wed, Jan 4, 2017 at 4:16 AM, Michael Mauger <michael <at> mauger.com>
> wrote:
>> I"m getting ready to push a change related to completing-read so let
>> me take a look.
> Hi Michael, any progress on this? Otherwise, does the attached patch
> look OK to install? I think it should fix the described problem.
> -- Simen
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Thu, 10 Aug 2017 21:27:02 GMT) Full text and rfc822 format available.

Message #31 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Michael Mauger <mmauger <at> protonmail.com>
Cc: Michael Mauger <michael <at> mauger.com>,
 andrés ramírez <rrandresf <at> gmail.com>,
 "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Thu, 10 Aug 2017 23:26:13 +0200
[Message part 1 (text/plain, inline)]
Thanks Michael. There's still a problem when psql exists with a
non-zero exit status. I think the attached patch is needed in
addition.

-- Simen
[0001-Handle-non-zero-exit-status-from-psql-more-gracefull.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Sat, 02 Sep 2017 13:10:03 GMT) Full text and rfc822 format available.

Message #34 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: michael <at> mauger.com, sunshavi <at> fastmail.fm, rrandresf <at> gmail.com,
 mmauger <at> protonmail.com, 25236 <at> debbugs.gnu.org
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Sat, 02 Sep 2017 16:09:27 +0300
> Date: Thu, 10 Aug 2017 23:26:13 +0200
> From: Simen Heggestøyl <simenheg <at> gmail.com>
> Cc: Michael Mauger <michael <at> mauger.com>,
>  andrés ramírez <rrandresf <at> gmail.com>,
>  "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
>  "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
> 
> Thanks Michael. There's still a problem when psql exists with a
> non-zero exit status. I think the attached patch is needed in
> addition.

Michael, any reasons not to push this patch?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25236; Package emacs. (Tue, 05 Sep 2017 00:19:01 GMT) Full text and rfc822 format available.

Message #37 received at 25236 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <mmauger <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "michael <at> mauger.com" <michael <at> mauger.com>,
 "rrandresf <at> gmail.com" <rrandresf <at> gmail.com>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>,
 Simen Heggestøyl <simenheg <at> gmail.com>,
 "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Mon, 04 Sep 2017 20:18:32 -0400
[Message part 1 (text/plain, inline)]
No. Go ahead and push it.

--
MICHAEL <at> MAUGER.COM // FSF and EFF member // GNU Emacs sql.el maintainer

> -------- Original Message --------
> Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
> Local Time: September 2, 2017 9:09 AM
> UTC Time: September 2, 2017 1:09 PM
> From: eliz <at> gnu.org
> To: Simen Heggestøyl <simenheg <at> gmail.com>
> mmauger <at> protonmail.com, michael <at> mauger.com, rrandresf <at> gmail.com, 25236 <at> debbugs.gnu.org, sunshavi <at> fastmail.fm
>
>> Date: Thu, 10 Aug 2017 23:26:13 +0200
>> From: Simen Heggestøyl <simenheg <at> gmail.com>
>> Cc: Michael Mauger <michael <at> mauger.com>,
>> andrés ramírez <rrandresf <at> gmail.com>,
>> "25236 <at> debbugs.gnu.org" <25236 <at> debbugs.gnu.org>,
>> "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>
>>
>> Thanks Michael. There"s still a problem when psql exists with a
>> non-zero exit status. I think the attached patch is needed in
>> addition.
>
> Michael, any reasons not to push this patch?
[Message part 2 (text/html, inline)]

Reply sent to Simen Heggestøyl <simenheg <at> gmail.com>:
You have taken responsibility. (Tue, 05 Sep 2017 18:37:01 GMT) Full text and rfc822 format available.

Notification sent to sunshavi <at> fastmail.fm:
bug acknowledged by developer. (Tue, 05 Sep 2017 18:37:01 GMT) Full text and rfc822 format available.

Message #42 received at 25236-done <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Michael Mauger <mmauger <at> protonmail.com>
Cc: "michael <at> mauger.com" <michael <at> mauger.com>, Eli Zaretskii <eliz <at> gnu.org>,
 "rrandresf <at> gmail.com" <rrandresf <at> gmail.com>,
 "sunshavi <at> fastmail.fm" <sunshavi <at> fastmail.fm>, 25236-done <at> debbugs.gnu.org
Subject: Re: bug#25236: 26.0.50; sql-postgres not working on master
Date: Tue, 05 Sep 2017 20:36:30 +0200
On Tue, Sep 5, 2017 at 2:18 AM, Michael Mauger <mmauger <at> protonmail.com> 
wrote:
> No. Go ahead and push it.

Pushed!

-- Simen





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Oct 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.