diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2018-03-02 08:57:38 -0500 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2018-03-02 13:48:33 -0500 |
| commit | fd1a421fe66173fb9b85d3fe150afde8e812cbe4 (patch) | |
| tree | 24c80c87337ec2d1bb46ee8463207d0cfff5ffc3 /src/bin/psql/tab-complete.c | |
| parent | 1733460f0205fc6d6bbe4c14911049a918c6e073 (diff) | |
Add prokind column, replacing proisagg and proiswindow
The new column distinguishes normal functions, procedures, aggregates,
and window functions. This replaces the existing columns proisagg and
proiswindow, and replaces the convention that procedures are indicated
by prorettype == 0. Also change prorettype to be VOIDOID for procedures.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Diffstat (limited to 'src/bin/psql/tab-complete.c')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 53f0d945ab2..47909ed4d92 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -349,7 +349,7 @@ static const SchemaQuery Query_for_list_of_aggregates = { /* catname */ "pg_catalog.pg_proc p", /* selcondition */ - "p.proisagg", + "p.prokind = 'a'", /* viscondition */ "pg_catalog.pg_function_is_visible(p.oid)", /* namespace */ @@ -397,7 +397,7 @@ static const SchemaQuery Query_for_list_of_functions = { /* catname */ "pg_catalog.pg_proc p", /* selcondition */ - "p.prorettype <> 0", + "p.prokind IN ('f', 'w')", /* viscondition */ "pg_catalog.pg_function_is_visible(p.oid)", /* namespace */ @@ -428,7 +428,7 @@ static const SchemaQuery Query_for_list_of_procedures = { /* catname */ "pg_catalog.pg_proc p", /* selcondition */ - "p.prorettype = 0", + "p.prokind = 'p'", /* viscondition */ "pg_catalog.pg_function_is_visible(p.oid)", /* namespace */ |
