Recognize common table expression as statement start in Postgres.
:prompt-regexp "^[[:alnum:]_]*=[#>] "
:prompt-length 5
:prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
+ :statement sql-postgres-statement-starters
:input-filter sql-remove-tabs-filter
:terminator ("\\(^\\s-*\\\\g\\|;\\)" . "\\g"))
(push (match-string 1 row) res))))
(nreverse res))))
+(defcustom sql-postgres-statement-starters
+ (regexp-opt '("with"))
+ "Additional statement-starting keywords in Postgres."
+ :type 'string
+ :group 'SQL
+ :version "28.1")
+
;; Customization for Interbase
(defcustom sql-interbase-program "isql"