]> git.eshelyaron.com Git - emacs.git/commitdiff
Quote table names for postgres listings (sql-mode)
authorMatthew Carter <m@ahungry.com>
Wed, 10 Feb 2016 03:05:15 +0000 (22:05 -0500)
committerMatthew Carter <m@ahungry.com>
Wed, 10 Feb 2016 03:05:15 +0000 (22:05 -0500)
* lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing
  unquoted table names to the completion list.

lisp/progmodes/sql.el

index 65e94bac5d31fd35f9d3c866be3792f23d43c68a..fd59f4687c6cf7d0205cb849d580e96f4b063f8b 100644 (file)
@@ -4948,8 +4948,8 @@ Try to set `comint-output-filter-functions' like this:
       ;; Return the list of table names (public schema name can be omitted)
       (mapcar #'(lambda (tbl)
                   (if (string= (car tbl) "public")
-                      (cadr tbl)
-                    (format "%s.%s" (car tbl) (cadr tbl))))
+                      (format "\"%s\"" (cadr tbl))
+                    (format "\"%s\".\"%s\"" (car tbl) (cadr tbl))))
               cl))))
 
 \f