Sort default partition to bottom of psql \d+
Minor patch to change sort order only Author: Ashutosh Bapat Reviewed-by: Álvaro Herrera, Simon Riggs
This commit is contained in:
parent
05b6ec39d7
commit
3bae43ca4d
|
@ -2875,7 +2875,8 @@ describeOneTableDetails(const char *schemaname,
|
||||||
" c.relkind"
|
" c.relkind"
|
||||||
" FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i"
|
" FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i"
|
||||||
" WHERE c.oid=i.inhrelid AND i.inhparent = '%s'"
|
" WHERE c.oid=i.inhrelid AND i.inhparent = '%s'"
|
||||||
" ORDER BY c.oid::pg_catalog.regclass::pg_catalog.text;", oid);
|
" ORDER BY pg_catalog.pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT',"
|
||||||
|
" c.oid::pg_catalog.regclass::pg_catalog.text;", oid);
|
||||||
else if (pset.sversion >= 80300)
|
else if (pset.sversion >= 80300)
|
||||||
printfPQExpBuffer(&buf,
|
printfPQExpBuffer(&buf,
|
||||||
"SELECT c.oid::pg_catalog.regclass"
|
"SELECT c.oid::pg_catalog.regclass"
|
||||||
|
|
|
@ -436,11 +436,11 @@ from hash_parted order by part;
|
||||||
Partition key: LIST (lower(a))
|
Partition key: LIST (lower(a))
|
||||||
Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
|
Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
|
||||||
part_cc_dd FOR VALUES IN ('cc', 'dd'),
|
part_cc_dd FOR VALUES IN ('cc', 'dd'),
|
||||||
part_default DEFAULT, PARTITIONED,
|
|
||||||
part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
|
part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
|
||||||
part_gg FOR VALUES IN ('gg'), PARTITIONED,
|
part_gg FOR VALUES IN ('gg'), PARTITIONED,
|
||||||
part_null FOR VALUES IN (NULL),
|
part_null FOR VALUES IN (NULL),
|
||||||
part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED
|
part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED,
|
||||||
|
part_default DEFAULT, PARTITIONED
|
||||||
|
|
||||||
-- cleanup
|
-- cleanup
|
||||||
drop table range_parted, list_parted;
|
drop table range_parted, list_parted;
|
||||||
|
|
Loading…
Reference in New Issue