branch: elpa/pg
commit 387596cb680007c80d9d87503d6b5c892bfcadc5
Author: Eric Marsden <[email protected]>
Commit: Eric Marsden <[email protected]>

    Implement pg-function-p for Picodata variant
---
 pg.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pg.el b/pg.el
index 336638398a..64de5ecfa9 100644
--- a/pg.el
+++ b/pg.el
@@ -4046,6 +4046,12 @@ Uses database connection CON."
             (res (pg-exec-prepared con sql `((,name . "text"))))
             (rows (pg-result res :tuples)))
        (not (null rows))))
+    ;; The _pico_routine table only includes user-defined functions, not 
builtins.
+    ('picodata
+     (let* ((sql "SELECT 1 FROM _pico_routine WHERE name=$1")
+            (res (pg-exec-prepared con sql `((,name . "text"))))
+            (rows (pg-result res :tuples)))
+       (not (null rows))))
     ('vertica
      ;; Vertica provides the v_catalog.user_functions and 
v_catalog.user_procedures tables that list
      ;; all user-defined functions and procedures, but current versions do not 
have any information

Reply via email to