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

Commit6ff21c0

Browse files
committed
psql: Make output of \dD more stable
\dD showed domain check constraints in arbitrary order, which cancause regression test failures, which was exposed by commit9895b35. To fix, order the constraints by conname, which matcheswhat psql does in other queries listing constraints.
1 parent9895b35 commit6ff21c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/bin/psql/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4449,7 +4449,7 @@ listDomains(const char *pattern, bool verbose, bool showSystem)
44494449
" CASE WHEN t.typnotnull THEN 'not null' END as \"%s\",\n"
44504450
" t.typdefault as \"%s\",\n"
44514451
" pg_catalog.array_to_string(ARRAY(\n"
4452-
" SELECT pg_catalog.pg_get_constraintdef(r.oid, true) FROM pg_catalog.pg_constraint r WHERE t.oid = r.contypid AND r.contype = 'c'\n"
4452+
" SELECT pg_catalog.pg_get_constraintdef(r.oid, true) FROM pg_catalog.pg_constraint r WHERE t.oid = r.contypid AND r.contype = 'c' ORDER BY r.conname\n"
44534453
" ), ' ') as \"%s\"",
44544454
gettext_noop("Schema"),
44554455
gettext_noop("Name"),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ alter domain con add check (VALUE > 0);
789789
List of domains
790790
Schema | Name | Type | Collation | Nullable | Default | Check
791791
--------+------+---------+-----------+----------+---------+--------------------------------------
792-
public | con | integer | | | | CHECK (VALUE< 34) CHECK (VALUE> 0)
792+
public | con | integer | | | | CHECK (VALUE> 0) CHECK (VALUE< 34)
793793
(1 row)
794794

795795
insert into domcontest values (-5); -- fails

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp