From: Matthew Carter Date: Wed, 10 Feb 2016 03:05:15 +0000 (-0500) Subject: Quote table names for postgres listings (sql-mode) X-Git-Tag: emacs-25.0.91~29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7dd45b6;p=emacs.git Quote table names for postgres listings (sql-mode) * lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing unquoted table names to the completion list. --- diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 65e94bac5d3..fd59f4687c6 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -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))))