mirror of
https://github.com/postgres/postgres.git
synced 2025-05-24 00:03:23 -04:00
Add test for REPLICA IDENTITY with a temporal key
You can only use REPLICA IDENTITY USING INDEX with a unique B-tree index. This commit just adds a test showing that you cannot use it with a WITHOUT OVERLAPS index (which is GiST). Author: Paul A. Jungwirth <pj@illuminatedcomputing.com> Discussion: https://www.postgresql.org/message-id/3775839b-3f0f-4c8a-ac03-a253222e6a4b%40illuminatedcomputing.com
This commit is contained in:
parent
84f08f2215
commit
482e108cd3
@ -448,6 +448,10 @@ SELECT * FROM tp2 ORDER BY id, valid_at;
|
||||
(1 row)
|
||||
|
||||
DROP TABLE temporal_partitioned;
|
||||
-- ALTER TABLE REPLICA IDENTITY
|
||||
-- (should fail)
|
||||
ALTER TABLE temporal_rng REPLICA IDENTITY USING INDEX temporal_rng_pk;
|
||||
ERROR: cannot use non-unique index "temporal_rng_pk" as replica identity
|
||||
--
|
||||
-- test FK dependencies
|
||||
--
|
||||
|
@ -315,6 +315,10 @@ SELECT * FROM tp1 ORDER BY id, valid_at;
|
||||
SELECT * FROM tp2 ORDER BY id, valid_at;
|
||||
DROP TABLE temporal_partitioned;
|
||||
|
||||
-- ALTER TABLE REPLICA IDENTITY
|
||||
-- (should fail)
|
||||
ALTER TABLE temporal_rng REPLICA IDENTITY USING INDEX temporal_rng_pk;
|
||||
|
||||
--
|
||||
-- test FK dependencies
|
||||
--
|
||||
|
Loading…
x
Reference in New Issue
Block a user