Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3bae43c

Browse files
Sort default partition to bottom of psql \d+
Minor patch to change sort order onlyAuthor: Ashutosh BapatReviewed-by: Álvaro Herrera, Simon Riggs
1 parent05b6ec3 commit3bae43c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎src/bin/psql/describe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2875,7 +2875,8 @@ describeOneTableDetails(const char *schemaname,
28752875
" c.relkind"
28762876
" FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i"
28772877
" WHERE c.oid=i.inhrelid AND i.inhparent = '%s'"
2878-
" ORDER BY c.oid::pg_catalog.regclass::pg_catalog.text;",oid);
2878+
" ORDER BY pg_catalog.pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT',"
2879+
" c.oid::pg_catalog.regclass::pg_catalog.text;",oid);
28792880
elseif (pset.sversion >=80300)
28802881
printfPQExpBuffer(&buf,
28812882
"SELECT c.oid::pg_catalog.regclass"

‎src/test/regress/expected/insert.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ from hash_parted order by part;
436436
Partition key: LIST (lower(a))
437437
Partitions: part_aa_bb FOR VALUES IN ('aa', 'bb'),
438438
part_cc_dd FOR VALUES IN ('cc', 'dd'),
439-
part_default DEFAULT, PARTITIONED,
440439
part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
441440
part_gg FOR VALUES IN ('gg'), PARTITIONED,
442441
part_null FOR VALUES IN (NULL),
443-
part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED
442+
part_xx_yy FOR VALUES IN ('xx', 'yy'), PARTITIONED,
443+
part_default DEFAULT, PARTITIONED
444444

445445
-- cleanup
446446
drop table range_parted, list_parted;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp