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

Commit482e108

Browse files
committed
Add test for REPLICA IDENTITY with a temporal key
You can only use REPLICA IDENTITY USING INDEX with a unique B-treeindex. This commit just adds a test showing that you cannot use itwith 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
1 parent84f08f2 commit482e108

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ SELECT * FROM tp2 ORDER BY id, valid_at;
448448
(1 row)
449449

450450
DROP TABLE temporal_partitioned;
451+
-- ALTER TABLE REPLICA IDENTITY
452+
-- (should fail)
453+
ALTER TABLE temporal_rng REPLICA IDENTITY USING INDEX temporal_rng_pk;
454+
ERROR: cannot use non-unique index "temporal_rng_pk" as replica identity
451455
--
452456
-- test FK dependencies
453457
--

‎src/test/regress/sql/without_overlaps.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ SELECT * FROM tp1 ORDER BY id, valid_at;
315315
SELECT*FROM tp2ORDER BY id, valid_at;
316316
DROPTABLE temporal_partitioned;
317317

318+
-- ALTER TABLE REPLICA IDENTITY
319+
-- (should fail)
320+
ALTERTABLE temporal_rng REPLICA IDENTITY USING INDEX temporal_rng_pk;
321+
318322
--
319323
-- test FK dependencies
320324
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp