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

Appearance settings

Commit 9e49676

Browse filesBrowse 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
Copy full SHA for 9e49676

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/bin/psql/describe.c

Copy file name to clipboardExpand all lines: src/bin/psql/describe.c
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.