-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise a error on an attempt to partition a Global Temporary Table. Th…
…is is not supported, again not because PostgreSQL do not allow partition on temporary table but because other RDBMS like Oracle, DB2 and MySQL do not support it. Add a regression test on partitioning.
- Loading branch information
Showing
7 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
---- | ||
-- Regression test to Global Temporary Table implementation | ||
-- | ||
-- Test for unsupported partitioning on GTT. | ||
-- | ||
---- | ||
-- Import the library | ||
LOAD 'pgtt'; | ||
-- Must throw ERROR: Global Temporary Table do not support partitioning. | ||
CREATE /*GLOBAL*/ TEMPORARY TABLE measurement ( | ||
logdate date not null, | ||
peaktemp int, | ||
unitsales int | ||
) PARTITION BY RANGE (logdate); | ||
ERROR: Global Temporary Table do not support partitioning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
---- | ||
-- Regression test to Global Temporary Table implementation | ||
-- | ||
-- Test for unsupported foreign keys on GTT. | ||
-- | ||
---- | ||
-- Import the library | ||
LOAD 'pgtt'; | ||
-- Must throw ERROR: attempt to create referential integrity constraint on temporary table. | ||
CREATE /*GLOBAL*/ TEMPORARY TABLE t2 (c1 integer, FOREIGN KEY (c1) REFERENCES source (id)); | ||
BEGIN; | ||
CREATE /*GLOBAL*/ TEMPORARY TABLE t2 (c1 integer); | ||
-- Must throw ERROR: attempt to create referential integrity constraint on temporary table. | ||
ALTER TABLE t2 ADD FOREIGN KEY (c1) REFERENCES source (id); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
---- | ||
-- Regression test to Global Temporary Table implementation | ||
-- | ||
-- Test for unsupported partitioning on GTT. | ||
-- | ||
---- | ||
-- Import the library | ||
LOAD 'pgtt'; | ||
-- Must throw ERROR: Global Temporary Table do not support partitioning. | ||
CREATE /*GLOBAL*/ TEMPORARY TABLE measurement ( | ||
logdate date not null, | ||
peaktemp int, | ||
unitsales int | ||
) PARTITION BY RANGE (logdate); |