Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 72ca611

Browse files
committed
Remove unnecessary "DISTINCT" in psql's queries for \dAc and \dAf.
A moment's examination of these queries is sufficient to see that they do not produce duplicate rows, unless perhaps there's catalog corruption. Using DISTINCT anyway is inefficient and confusing; moreover it sets a poor example for anyone who refers to psql -E output to see how to query the catalogs.
1 parent 6d78f21 commit 72ca611

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6065,7 +6065,7 @@ listOperatorClasses(const char *access_method_pattern,
60656065
initPQExpBuffer(&buf);
60666066

60676067
printfPQExpBuffer(&buf,
6068-
"SELECT DISTINCT"
6068+
"SELECT\n"
60696069
" am.amname AS \"%s\",\n"
60706070
" pg_catalog.format_type(c.opcintype, NULL) AS \"%s\",\n"
60716071
" CASE\n"
@@ -6160,7 +6160,7 @@ listOperatorFamilies(const char *access_method_pattern,
61606160
initPQExpBuffer(&buf);
61616161

61626162
printfPQExpBuffer(&buf,
6163-
"SELECT DISTINCT"
6163+
"SELECT\n"
61646164
" am.amname AS \"%s\",\n"
61656165
" CASE\n"
61666166
" WHEN pg_catalog.pg_opfamily_is_visible(f.oid)\n"

0 commit comments

Comments
 (0)