mirror of
https://github.com/postgres/postgres.git
synced 2025-08-05 07:41:25 +03:00
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.
This commit is contained in:
@@ -6071,7 +6071,7 @@ listOperatorClasses(const char *access_method_pattern,
|
|||||||
initPQExpBuffer(&buf);
|
initPQExpBuffer(&buf);
|
||||||
|
|
||||||
printfPQExpBuffer(&buf,
|
printfPQExpBuffer(&buf,
|
||||||
"SELECT DISTINCT"
|
"SELECT\n"
|
||||||
" am.amname AS \"%s\",\n"
|
" am.amname AS \"%s\",\n"
|
||||||
" pg_catalog.format_type(c.opcintype, NULL) AS \"%s\",\n"
|
" pg_catalog.format_type(c.opcintype, NULL) AS \"%s\",\n"
|
||||||
" CASE\n"
|
" CASE\n"
|
||||||
@@ -6166,7 +6166,7 @@ listOperatorFamilies(const char *access_method_pattern,
|
|||||||
initPQExpBuffer(&buf);
|
initPQExpBuffer(&buf);
|
||||||
|
|
||||||
printfPQExpBuffer(&buf,
|
printfPQExpBuffer(&buf,
|
||||||
"SELECT DISTINCT"
|
"SELECT\n"
|
||||||
" am.amname AS \"%s\",\n"
|
" am.amname AS \"%s\",\n"
|
||||||
" CASE\n"
|
" CASE\n"
|
||||||
" WHEN pg_catalog.pg_opfamily_is_visible(f.oid)\n"
|
" WHEN pg_catalog.pg_opfamily_is_visible(f.oid)\n"
|
||||||
|
Reference in New Issue
Block a user