[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an i
From: |
Andrew Schein |
Subject: |
bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port |
Date: |
Tue, 20 Sep 2011 18:08:51 -0700 |
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
- bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port,
Andrew Schein <=