You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a multi-column GiST index exclusion constraint. It was created with a specific order of columns, however the "SQL" view on the table or constraint show them in the wrong order.
To Reproduce
CREATE EXTENSION IF NOT EXISTS btree_gist;
CREATETABLEa_b_relation (
a integerNOT NULL,
b integerNOT NULL,
valid tstzrange NOT NULL,
CONSTRAINT a_b_excl EXCLUDE USING gist (
a WITH =,
b WITH =,
valid WITH &&
)
);
Then visit the "SQL" tab for the public.a_b_relation table. It'll show
CREATE TABLE IF NOT EXISTS public.a_b_relation
(
a integer NOT NULL,
b integer NOT NULL,
valid tstzrange NOT NULL,
CONSTRAINT a_b_excl EXCLUDE USING gist (
valid WITH &&,
b WITH =,
a WITH =)
)
Similarly, the "SQL" view of the constraint itself has the same; and in the "Properties"->"Constraints"->"Exclude" dialog the "Columns/Expressions" table column also lists them in the wrong order.
Expected behavior
It should display the exclusion constraint with the rows in the same order they were created in. Notice that psql gets it right:
example=# \d a_b_relation
Table "public.a_b_relation"
Column | Type | Collation | Nullable | Default
--------+-----------+-----------+----------+---------
a | integer | | not null |
b | integer | | not null |
valid | tstzrange | | not null |
Indexes:
"a_b_excl" EXCLUDE USING gist (a WITH =, b WITH =, valid WITH &&)
Environment:
OS: Ubuntu
Version: 8.14
Mode: Desktop
Additional context
I found the thread bugfix: dlgIndex column order from 2009 on the mailing list which might be related, but I guess this is about ordering (ASC, DESC etc) in a column, not the order amongst columns.
The text was updated successfully, but these errors were encountered:
I'm using a multi-column GiST index exclusion constraint. It was created with a specific order of columns, however the "SQL" view on the table or constraint show them in the wrong order.
To Reproduce
Then visit the "SQL" tab for the
public.a_b_relation
table. It'll showSimilarly, the "SQL" view of the constraint itself has the same; and in the "Properties"->"Constraints"->"Exclude" dialog the "Columns/Expressions" table column also lists them in the wrong order.
Expected behavior
It should display the exclusion constraint with the rows in the same order they were created in. Notice that
psql
gets it right:Environment:
Additional context
I found the thread bugfix: dlgIndex column order from 2009 on the mailing list which might be related, but I guess this is about ordering (
ASC
,DESC
etc) in a column, not the order amongst columns.The text was updated successfully, but these errors were encountered: