Skip to content

Commit 85290d4

Browse files
Fixed an issue where the column order displayed was incorrect for exclusion constraints with multiple columns. #8430
1 parent 48a26e8 commit 85290d4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/11_plus/create_exclusion_constraint_exp.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
ALTER TABLE IF EXISTS testschema.tableforexclusion
66
ADD CONSTRAINT "Exclusion_$%{}[]()&*^!@""'`\/#" EXCLUDE USING gist (
7-
(col1 + col3) WITH <>,
8-
col2 WITH <>)
7+
col2 WITH <>,
8+
(col1 + col3) WITH <>)
99
WITH (FILLFACTOR=12)
1010
WHERE (col1 > 1)
1111
DEFERRABLE INITIALLY DEFERRED;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/default/create_exclusion_constraint_exp.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
ALTER TABLE IF EXISTS testschema.tableforexclusion
66
ADD CONSTRAINT "Exclusion_$%{}[]()&*^!@""'`\/#" EXCLUDE USING gist (
7-
(col1 + col3) WITH <>,
8-
col2 WITH <>)
7+
col2 WITH <>,
8+
(col1 + col3) WITH <>)
99
WITH (FILLFACTOR=12)
1010
WHERE (col1 > 1)
1111
DEFERRABLE INITIALLY DEFERRED;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
UNION
44
{% endif %}
55
SELECT
6+
a.attnum,
67
i.indoption[{{loop.index -1}}] AS options,
78
pg_catalog.pg_get_indexdef(i.indexrelid, {{loop.index}}, true) AS coldef,
89
op.oprname,
@@ -21,3 +22,4 @@ LEFT OUTER JOIN pg_catalog.pg_collation coll ON a.attcollation=coll.oid
2122
LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
2223
WHERE i.indexrelid = {{cid}}::oid
2324
{% endfor %}
25+
ORDER BY attnum

0 commit comments

Comments
 (0)