Content-Length: 274403 | pFad | http://github.com/postgrespro/postgres/commit/9e496768b8a7303ea07888ea1baae8e2a57dda7b

0C Remove unnecessary "DISTINCT" in psql's queries for \dAc and \dAf. · postgrespro/postgres@9e49676 · GitHub
Skip to content

Commit 9e49676

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 eeb01e3 commit 9e49676

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
@@ -6071,7 +6071,7 @@ listOperatorClasses(const char *access_method_pattern,
60716071
initPQExpBuffer(&buf);
60726072

60736073
printfPQExpBuffer(&buf,
6074-
"SELECT DISTINCT"
6074+
"SELECT\n"
60756075
" am.amname AS \"%s\",\n"
60766076
" pg_catalog.format_type(c.opcintype, NULL) AS \"%s\",\n"
60776077
" CASE\n"
@@ -6166,7 +6166,7 @@ listOperatorFamilies(const char *access_method_pattern,
61666166
initPQExpBuffer(&buf);
61676167

61686168
printfPQExpBuffer(&buf,
6169-
"SELECT DISTINCT"
6169+
"SELECT\n"
61706170
" am.amname AS \"%s\",\n"
61716171
" CASE\n"
61726172
" WHEN pg_catalog.pg_opfamily_is_visible(f.oid)\n"

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/9e496768b8a7303ea07888ea1baae8e2a57dda7b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy