diff options
Diffstat (limited to 'src/test/regress/sql/create_table.sql')
-rw-r--r-- | src/test/regress/sql/create_table.sql | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql index ab424dcddfd..00ef81a6850 100644 --- a/src/test/regress/sql/create_table.sql +++ b/src/test/regress/sql/create_table.sql @@ -401,11 +401,6 @@ CREATE TABLE partitioned ( ) PARTITION BY RANGE (immut_func(a)); DROP FUNCTION immut_func(int); --- cannot contain whole-row references -CREATE TABLE partitioned ( - a int -) PARTITION BY RANGE ((partitioned)); - -- prevent using columns of unsupported types in key (type must have a btree operator class) CREATE TABLE partitioned ( a point @@ -470,6 +465,18 @@ explain (costs off) select * from partitioned where row(a,b)::partitioned = '(1,2)'::partitioned; drop table partitioned; +-- whole-row Var in partition key works too +create table partitioned (a int, b int) + partition by list ((partitioned)); +create table partitioned1 + partition of partitioned for values in ('(1,2)'); +create table partitioned2 + partition of partitioned for values in ('(2,4)'); +explain (costs off) +select * from partitioned where partitioned = '(1,2)'::partitioned; +\d+ partitioned1 +drop table partitioned; + -- check that dependencies of partition columns are handled correctly create domain intdom1 as int; |