emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#9566: closed (sql-mode: sql-comint-postgres can't


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9566: closed (sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port)
Date: Thu, 22 Sep 2011 07:08:03 +0000

Your message dated Thu, 22 Sep 2011 03:06:43 -0400
with message-id <address@hidden>
and subject line Re: bug#9566: sql-mode: sql-comint-postgres can't decide if 
sql-port is an integer or port
has caused the debbugs.gnu.org bug report #9566,
regarding sql-mode: sql-comint-postgres can't decide if sql-port is an integer 
or port
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9566: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9566
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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



--- End Message ---
--- Begin Message --- Subject: Re: bug#9566: sql-mode: sql-comint-postgres can't decide if sql-port is an integer or port Date: Thu, 22 Sep 2011 03:06:43 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.1

Thank you; applied. (FYI, your patch had extraneous whitespace changes.)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]