Merged the latest code of 'pgcli' used for the autocomplete feature. Fixes #5497

This commit is contained in:
Akshay Joshi
2020-10-01 12:53:45 +05:30
parent 3f817494f8
commit 300de05a20
13 changed files with 574 additions and 818 deletions

View File

@@ -8,9 +8,11 @@ SELECT n.nspname schema_name,
CASE WHEN p.prokind = 'a' THEN true ELSE false END is_aggregate,
CASE WHEN p.prokind = 'w' THEN true ELSE false END is_window,
p.proretset is_set_returning,
d.deptype = 'e' is_extension,
pg_get_expr(proargdefaults, 0) AS arg_defaults
FROM pg_catalog.pg_proc p
INNER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
LEFT JOIN pg_depend d ON d.objid = p.oid and d.deptype = 'e'
WHERE p.prorettype::regtype != 'trigger'::regtype
AND n.nspname IN ({{schema_names}})
ORDER BY 1, 2

View File

@@ -8,9 +8,11 @@ SELECT n.nspname schema_name,
p.proisagg is_aggregate,
p.proiswindow is_window,
p.proretset is_set_returning,
d.deptype = 'e' is_extension,
pg_get_expr(proargdefaults, 0) AS arg_defaults
FROM pg_catalog.pg_proc p
INNER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
LEFT JOIN pg_depend d ON d.objid = p.oid and d.deptype = 'e'
WHERE p.prorettype::regtype != 'trigger'::regtype
AND n.nspname IN ({{schema_names}})
ORDER BY 1, 2