diff options
| author | Alvaro Herrera | 2017-04-17 21:34:29 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2017-04-17 21:34:29 +0000 |
| commit | ee6922112e9b3c02b995bd1d838c9a261f060133 (patch) | |
| tree | 2d8678c97967dbdccdfa692a4b75fdd5f21cbe06 /src/bin/psql | |
| parent | 8c5cdb7f4f6e1d6a6104cb58ce4f23453891651b (diff) | |
Rename columns in new pg_statistic_ext catalog
The new catalog reused a column prefix "sta" from pg_statistic, but this
is undesirable, so change the catalog to use prefix "stx" instead.
Also, rename the column that lists enabled statistic kinds as "stxkind"
rather than "enabled".
Discussion: https://postgr.es/m/CAKJS1f_2t5jhSN7huYRFH3w3rrHfG2QU7hiUHsu-Vdjd1rYT3w@mail.gmail.com
Diffstat (limited to 'src/bin/psql')
| -rw-r--r-- | src/bin/psql/describe.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 59121b8d1b..0f9f497c66 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2344,16 +2344,16 @@ describeOneTableDetails(const char *schemaname, { printfPQExpBuffer(&buf, "SELECT oid, " - "stanamespace::pg_catalog.regnamespace AS nsp, " - "staname, stakeys,\n" + "stxnamespace::pg_catalog.regnamespace AS nsp, " + "stxname, stxkeys,\n" " (SELECT pg_catalog.string_agg(pg_catalog.quote_ident(attname),', ')\n" - " FROM pg_catalog.unnest(stakeys) s(attnum)\n" - " JOIN pg_catalog.pg_attribute a ON (starelid = a.attrelid AND\n" + " FROM pg_catalog.unnest(stxkeys) s(attnum)\n" + " JOIN pg_catalog.pg_attribute a ON (stxrelid = a.attrelid AND\n" " a.attnum = s.attnum AND NOT attisdropped)) AS columns,\n" - " (staenabled @> '{d}') AS ndist_enabled,\n" - " (staenabled @> '{f}') AS deps_enabled\n" + " (stxkind @> '{d}') AS ndist_enabled,\n" + " (stxkind @> '{f}') AS deps_enabled\n" "FROM pg_catalog.pg_statistic_ext stat " - "WHERE starelid = '%s'\n" + "WHERE stxrelid = '%s'\n" "ORDER BY 1;", oid); |
