* bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port
@ 2011-09-21 1:08 Andrew Schein
2011-09-22 7:06 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Schein @ 2011-09-21 1:08 UTC (permalink / raw)
To: 9566
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port
2011-09-21 1:08 bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port Andrew Schein
@ 2011-09-22 7:06 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2011-09-22 7:06 UTC (permalink / raw)
To: 9566-done
Version: 24.1
Thank you; applied. (FYI, your patch had extraneous whitespace changes.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-22 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 1:08 bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port Andrew Schein
2011-09-22 7:06 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.