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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy