mirror of https://github.com/citusdata/citus.git
Add ORDER BY to multi_foreign_key
parent
332ccbf8c1
commit
f06a79563d
|
@ -671,7 +671,7 @@ ALTER TABLE referencing_table DROP CONSTRAINT test_constraint;
|
||||||
-- test MATCH SIMPLE
|
-- test MATCH SIMPLE
|
||||||
ALTER TABLE referencing_table ADD CONSTRAINT test_constraint FOREIGN KEY(ref_id, id) REFERENCES referenced_table(id, test_column) MATCH SIMPLE;
|
ALTER TABLE referencing_table ADD CONSTRAINT test_constraint FOREIGN KEY(ref_id, id) REFERENCES referenced_table(id, test_column) MATCH SIMPLE;
|
||||||
INSERT INTO referencing_table VALUES(null, 2);
|
INSERT INTO referencing_table VALUES(null, 2);
|
||||||
SELECT * FROM referencing_table;
|
SELECT * FROM referencing_table ORDER BY 1,2;
|
||||||
id | ref_id
|
id | ref_id
|
||||||
----+--------
|
----+--------
|
||||||
10 | 1
|
10 | 1
|
||||||
|
|
|
@ -392,7 +392,7 @@ ALTER TABLE referencing_table DROP CONSTRAINT test_constraint;
|
||||||
-- test MATCH SIMPLE
|
-- test MATCH SIMPLE
|
||||||
ALTER TABLE referencing_table ADD CONSTRAINT test_constraint FOREIGN KEY(ref_id, id) REFERENCES referenced_table(id, test_column) MATCH SIMPLE;
|
ALTER TABLE referencing_table ADD CONSTRAINT test_constraint FOREIGN KEY(ref_id, id) REFERENCES referenced_table(id, test_column) MATCH SIMPLE;
|
||||||
INSERT INTO referencing_table VALUES(null, 2);
|
INSERT INTO referencing_table VALUES(null, 2);
|
||||||
SELECT * FROM referencing_table;
|
SELECT * FROM referencing_table ORDER BY 1,2;
|
||||||
DELETE FROM referencing_table WHERE ref_id = 2;
|
DELETE FROM referencing_table WHERE ref_id = 2;
|
||||||
ALTER TABLE referencing_table DROP CONSTRAINT test_constraint;
|
ALTER TABLE referencing_table DROP CONSTRAINT test_constraint;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue