diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-03 14:02:35 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-03 14:02:35 -0400 |
commit | 9e496768b8a7303ea07888ea1baae8e2a57dda7b (patch) | |
tree | 68859ce656f30d7b817e3c466fce53a2773c017c | |
parent | eeb01e3122bb0acb6f8575d352e8e63101662ae7 (diff) |
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.
-rw-r--r-- | src/bin/psql/describe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 57266f4fc35..d81f1575bf4 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -6071,7 +6071,7 @@ listOperatorClasses(const char *access_method_pattern, initPQExpBuffer(&buf); printfPQExpBuffer(&buf, - "SELECT DISTINCT" + "SELECT\n" " am.amname AS \"%s\",\n" " pg_catalog.format_type(c.opcintype, NULL) AS \"%s\",\n" " CASE\n" @@ -6166,7 +6166,7 @@ listOperatorFamilies(const char *access_method_pattern, initPQExpBuffer(&buf); printfPQExpBuffer(&buf, - "SELECT DISTINCT" + "SELECT\n" " am.amname AS \"%s\",\n" " CASE\n" " WHEN pg_catalog.pg_opfamily_is_visible(f.oid)\n" |