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.
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"
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"