From 7dd45b61b1cdcf0e5bd1620ab7e63a0b5095ffb8 Mon Sep 17 00:00:00 2001 From: Matthew Carter Date: Tue, 9 Feb 2016 22:05:15 -0500 Subject: [PATCH] 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. --- lisp/progmodes/sql.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)))) -- 2.39.2