GNU bug report logs -
#9566
sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 9566 <at> debbugs.gnu.org.
--
9566: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9566
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Version: 24.1
Thank you; applied. (FYI, your patch had extraneous whitespace changes.)
[Message part 3 (message/rfc822, inline)]
sql-port is initialized as an integer in sql.el, but later treated as
a string when building up the params variable within the function
sql-comint-postgres. Below is my small patch that fixes this.
Cheers,
Andy
=== modified file 'lisp/progmodes/sql.el'
*** lisp/progmodes/sql.el 2011-07-06 03:51:48 +0000
--- lisp/progmodes/sql.el 2011-09-21 00:56:35 +0000
*************** Try to set `comint-output-filter-functio
*** 4719,4731 ****
;; sql-postgres-options.
(let ((params options))
(if (not (string= "" sql-database))
! (setq params (append params (list sql-database))))
(if (not (string= "" sql-server))
! (setq params (append (list "-h" sql-server) params)))
(if (not (string= "" sql-user))
! (setq params (append (list "-U" sql-user) params)))
(if (not (= 0 sql-port))
! (setq params (append (list "-p" sql-port) params)))
(sql-comint product params)))
(defun sql-postgres-completion-object (sqlbuf schema)
--- 4719,4731 ----
;; sql-postgres-options.
(let ((params options))
(if (not (string= "" sql-database))
! (setq params (append params (list sql-database))))
(if (not (string= "" sql-server))
! (setq params (append (list "-h" sql-server) params)))
(if (not (string= "" sql-user))
! (setq params (append (list "-U" sql-user) params)))
(if (not (= 0 sql-port))
! (setq params (append (list "-p" (number-to-string sql-port)) params)))
(sql-comint product params)))
(defun sql-postgres-completion-object (sqlbuf schema)
--
Andrew I. Schein
www.andrewschein.com
This bug report was last modified 13 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.