From fd1a421fe66173fb9b85d3fe150afde8e812cbe4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 2 Mar 2018 08:57:38 -0500 Subject: 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 Reviewed-by: Michael Paquier --- src/bin/psql/tab-complete.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bin/psql/tab-complete.c') 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 */ -- cgit v1.2.3