1
This isn't what you've asked, but is possibly the actual problem. Does it help?
(add-hook 'sql-interactive-mode-hook 'my-sql-interactive-mode-hook)
(defun my-sql-interactive-mode-hook ()
"Custom interactive SQL mode behaviours. See `sql-interactive-mode-hook'."
;; Product-specific behaviours.
(when (eq sql-product 'postgres)
;; Allow symbol ...
Only top voted, non community-wiki answers of a minimum length are eligible