Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6e132d

Browse files
committed
In psql, restore old behavior of Query_for_list_of_functions.
Historically, tab completion for functions has offered the names ofaggregates as well. This is essential in at least one context, namelyGRANT/REVOKE, because there is no GRANT ON AGGREGATE syntax. Thereare other cases where a command that nominally is for functions willallow aggregates as well, though not all do.Commitfd1a421 changed this query to disallow aggregates, but thatdoesn't seem to have been thought through very carefully. Change itto allow aggregates (but still ignore procedures).We might at some point tighten this up, but it'd require sorting throughall the uses of this query to see which ones should offer aggregatenames and which shouldn't. Given the lack of field complaints aboutthe historical laxity here, that's work I'm not eager to do right now.Discussion:https://postgr.es/m/14268.1520283126@sss.pgh.pa.us
1 parent5748f3a commitb6e132d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/psql/tab-complete.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,15 @@ static const SchemaQuery Query_for_list_of_domains = {
461461
NULL
462462
};
463463

464+
/* Note: this intentionally accepts aggregates as well as plain functions */
464465
staticconstSchemaQueryQuery_for_list_of_functions[]= {
465466
{
466467
/* min_server_version */
467468
110000,
468469
/* catname */
469470
"pg_catalog.pg_proc p",
470471
/* selcondition */
471-
"p.prokindIN ('f', 'w')",
472+
"p.prokind!= 'p'",
472473
/* viscondition */
473474
"pg_catalog.pg_function_is_visible(p.oid)",
474475
/* namespace */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp