emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dac694b: * lisp/progmodes/sql.el: `sql-postgres-statement-starter


From: Ingo Lohmar
Subject: master dac694b: * lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom
Date: Wed, 19 May 2021 09:07:57 -0400 (EDT)

branch: master
commit dac694b8bb1e5a31a50215ceee6b064ae7c5001f
Author: Ingo Lohmar <ingo.lohmar@posteo.net>
Commit: Ingo Lohmar <ingo.lohmar@posteo.net>

    * lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom
    
    Recognize common table expression as statement start in Postgres.
---
 lisp/progmodes/sql.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 83cb77e..2bfb222 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -484,6 +484,7 @@ file.  Since that is a plaintext file, this could be 
dangerous."
      :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"))
 
@@ -1239,6 +1240,13 @@ add your name with a \"-U\" prefix (such as \"-Umark\") 
to the list."
             (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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]