Skip to content

Commit 43a0c43

Browse files
gfphoenix78my-ship-it
authored andcommitted
Fix test cases for gp-style partition in single-node mode
The commit 782d9b7 fixes inheritance issue on gp-style partition table. The test cases for single-node are not fixed yet.
1 parent 6ca10b9 commit 43a0c43

4 files changed

Lines changed: 133 additions & 130 deletions

File tree

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
837837
accessMethod = stmt->accessMethod;
838838

839839
/* Only to allow access method when the partition is gp style partition */
840-
if (partitioned && Gp_role == GP_ROLE_DISPATCH && !stmt->partspec->gpPartDef)
840+
if (partitioned && Gp_role != GP_ROLE_EXECUTE && !stmt->partspec->gpPartDef)
841841
ereport(ERROR,
842842
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
843843
errmsg("specifying a table access method is not supported on a partitioned table")));

src/test/singlenode_regress/expected/AOCO_Compression.out

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,49 +1803,49 @@ alter table co_wt_sub_partrle_type8192_1_2 add partition new_p values('C') WITH
18031803
Table "public.co_wt_sub_partrle_type8192_1_2_1_prt_new_p_2_prt_3"
18041804
Column | Type | Collation | Nullable | Default | Storage | Stats target | Compression Type | Compression Level | Block Size | Description
18051805
--------+-----------------------------+-----------+----------+------------------------------------------------------------+----------+--------------+------------------+-------------------+------------+-------------
1806-
id | integer | | not null | nextval('co_wt_sub_partrle_type8192_1_2_id_seq'::regclass) | plain | | rle_type | 1 | 8192 |
1807-
a1 | integer | | | | plain | | rle_type | 1 | 8192 |
1808-
a2 | character(5) | | | | extended | | rle_type | 1 | 8192 |
1809-
a3 | numeric | | | | main | | rle_type | 1 | 8192 |
1810-
a4 | boolean | | | false | plain | | rle_type | 1 | 8192 |
1811-
a5 | character(1) | | | 'd'::bpchar | extended | | rle_type | 1 | 8192 |
1812-
a6 | text | | | | extended | | rle_type | 1 | 8192 |
1813-
a7 | timestamp without time zone | | | | plain | | rle_type | 1 | 8192 |
1814-
a8 | character varying(705) | | | | extended | | rle_type | 1 | 8192 |
1815-
a9 | bigint | | | | plain | | rle_type | 1 | 8192 |
1816-
a10 | date | | | | plain | | rle_type | 1 | 8192 |
1817-
a11 | character varying(600) | | | | extended | | rle_type | 1 | 8192 |
1818-
a12 | text | | | | extended | | rle_type | 1 | 8192 |
1819-
a13 | numeric | | | | main | | rle_type | 1 | 8192 |
1820-
a14 | real | | | | plain | | rle_type | 1 | 8192 |
1821-
a15 | bigint | | | | plain | | rle_type | 1 | 8192 |
1822-
a16 | integer | | | | plain | | rle_type | 1 | 8192 |
1823-
a17 | bytea | | | | extended | | rle_type | 1 | 8192 |
1824-
a18 | timestamp with time zone | | | | plain | | rle_type | 1 | 8192 |
1825-
a19 | time with time zone | | | | plain | | rle_type | 1 | 8192 |
1826-
a20 | path | | | | extended | | rle_type | 1 | 8192 |
1827-
a21 | box | | | | plain | | rle_type | 1 | 8192 |
1828-
a22 | macaddr | | | | plain | | rle_type | 1 | 8192 |
1829-
a23 | interval | | | | plain | | rle_type | 1 | 8192 |
1830-
a24 | character varying(800) | | | | extended | | rle_type | 1 | 8192 |
1831-
a25 | lseg | | | | plain | | rle_type | 1 | 8192 |
1832-
a26 | point | | | | plain | | rle_type | 1 | 8192 |
1833-
a27 | double precision | | | | plain | | rle_type | 1 | 8192 |
1834-
a28 | circle | | | | plain | | rle_type | 1 | 8192 |
1835-
a29 | integer | | | | plain | | rle_type | 1 | 8192 |
1836-
a30 | numeric(8,0) | | | | main | | rle_type | 1 | 8192 |
1837-
a31 | polygon | | | | extended | | rle_type | 1 | 8192 |
1838-
a32 | date | | | | plain | | rle_type | 1 | 8192 |
1839-
a33 | real | | | | plain | | rle_type | 1 | 8192 |
1840-
a34 | money | | | | plain | | rle_type | 1 | 8192 |
1841-
a35 | cidr | | | | main | | rle_type | 1 | 8192 |
1842-
a36 | inet | | | | main | | rle_type | 1 | 8192 |
1843-
a37 | time without time zone | | | | plain | | rle_type | 1 | 8192 |
1844-
a38 | text | | | | extended | | rle_type | 1 | 8192 |
1845-
a39 | bit(1) | | | | extended | | rle_type | 1 | 8192 |
1846-
a40 | bit varying(5) | | | | extended | | rle_type | 1 | 8192 |
1847-
a41 | smallint | | | | plain | | rle_type | 1 | 8192 |
1848-
a42 | integer | | | | plain | | rle_type | 1 | 8192 |
1806+
id | integer | | not null | nextval('co_wt_sub_partrle_type8192_1_2_id_seq'::regclass) | plain | | zlib | 1 | 32768 |
1807+
a1 | integer | | | | plain | | zlib | 1 | 32768 |
1808+
a2 | character(5) | | | | extended | | zlib | 1 | 32768 |
1809+
a3 | numeric | | | | main | | zlib | 1 | 32768 |
1810+
a4 | boolean | | | false | plain | | zlib | 1 | 32768 |
1811+
a5 | character(1) | | | 'd'::bpchar | extended | | zlib | 1 | 32768 |
1812+
a6 | text | | | | extended | | zlib | 1 | 32768 |
1813+
a7 | timestamp without time zone | | | | plain | | zlib | 1 | 32768 |
1814+
a8 | character varying(705) | | | | extended | | zlib | 1 | 32768 |
1815+
a9 | bigint | | | | plain | | zlib | 1 | 32768 |
1816+
a10 | date | | | | plain | | zlib | 1 | 32768 |
1817+
a11 | character varying(600) | | | | extended | | zlib | 1 | 32768 |
1818+
a12 | text | | | | extended | | zlib | 1 | 32768 |
1819+
a13 | numeric | | | | main | | zlib | 1 | 32768 |
1820+
a14 | real | | | | plain | | zlib | 1 | 32768 |
1821+
a15 | bigint | | | | plain | | zlib | 1 | 32768 |
1822+
a16 | integer | | | | plain | | zlib | 1 | 32768 |
1823+
a17 | bytea | | | | extended | | zlib | 1 | 32768 |
1824+
a18 | timestamp with time zone | | | | plain | | zlib | 1 | 32768 |
1825+
a19 | time with time zone | | | | plain | | zlib | 1 | 32768 |
1826+
a20 | path | | | | extended | | zlib | 1 | 32768 |
1827+
a21 | box | | | | plain | | zlib | 1 | 32768 |
1828+
a22 | macaddr | | | | plain | | zlib | 1 | 32768 |
1829+
a23 | interval | | | | plain | | zlib | 1 | 32768 |
1830+
a24 | character varying(800) | | | | extended | | zlib | 1 | 32768 |
1831+
a25 | lseg | | | | plain | | zlib | 1 | 32768 |
1832+
a26 | point | | | | plain | | zlib | 1 | 32768 |
1833+
a27 | double precision | | | | plain | | zlib | 1 | 32768 |
1834+
a28 | circle | | | | plain | | zlib | 1 | 32768 |
1835+
a29 | integer | | | | plain | | zlib | 1 | 32768 |
1836+
a30 | numeric(8,0) | | | | main | | zlib | 1 | 32768 |
1837+
a31 | polygon | | | | extended | | zlib | 1 | 32768 |
1838+
a32 | date | | | | plain | | zlib | 1 | 32768 |
1839+
a33 | real | | | | plain | | zlib | 1 | 32768 |
1840+
a34 | money | | | | plain | | zlib | 1 | 32768 |
1841+
a35 | cidr | | | | main | | zlib | 1 | 32768 |
1842+
a36 | inet | | | | main | | zlib | 1 | 32768 |
1843+
a37 | time without time zone | | | | plain | | zlib | 1 | 32768 |
1844+
a38 | text | | | | extended | | zlib | 1 | 32768 |
1845+
a39 | bit(1) | | | | extended | | zlib | 1 | 32768 |
1846+
a40 | bit varying(5) | | | | extended | | zlib | 1 | 32768 |
1847+
a41 | smallint | | | | plain | | zlib | 1 | 32768 |
1848+
a42 | integer | | | | plain | | zlib | 1 | 32768 |
18491849
Partition of: co_wt_sub_partrle_type8192_1_2_1_prt_new_p FOR VALUES FROM (1001) TO (2001)
18501850
Partition constraint: ((a2 IS NOT NULL) AND (a2 = 'C '::character(5)) AND (a1 IS NOT NULL) AND (a1 >= 1001) AND (a1 < 2001))
18511851
Checksum: t

0 commit comments

Comments
 (0)