Skip to content

Commit 29b3a28

Browse files
committed
Fix some answer files for pax storage
1 parent e8c44c5 commit 29b3a28

4 files changed

Lines changed: 45 additions & 28 deletions

File tree

contrib/pax_storage/src/test/regress/expected/collate.icu.utf8_1.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
/* skip test if not UTF8 server encoding or no ICU collations installed */
55
SELECT getdatabaseencoding() <> 'UTF8' OR
6-
(SELECT count(*) FROM pg_collation WHERE collprovider = 'i') = 0
6+
(SELECT count(*) FROM pg_collation WHERE collprovider = 'i' AND collname <> 'unicode') = 0
77
AS skip_test \gset
88
\if :skip_test
99
\quit

contrib/pax_storage/src/test/regress/expected/foreign_data.out

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ CREATE FOREIGN DATA WRAPPER test_fdw HANDLER invalid_fdw_handler; -- ERROR
109109
ERROR: function invalid_fdw_handler must return type fdw_handler
110110
CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER invalid_fdw_handler; -- ERROR
111111
ERROR: conflicting or redundant options
112+
LINE 1: ...GN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER in...
113+
^
112114
CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler;
113115
DROP FOREIGN DATA WRAPPER test_fdw;
114116
-- ALTER FOREIGN DATA WRAPPER
@@ -215,6 +217,8 @@ ALTER FOREIGN DATA WRAPPER foo HANDLER invalid_fdw_handler; -- ERROR
215217
ERROR: function invalid_fdw_handler must return type fdw_handler
216218
ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER anything; -- ERROR
217219
ERROR: conflicting or redundant options
220+
LINE 1: ...FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER an...
221+
^
218222
ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler;
219223
WARNING: changing the foreign-data wrapper handler can change behavior of existing foreign tables
220224
DROP FUNCTION invalid_fdw_handler();
@@ -328,7 +332,6 @@ CREATE SERVER s6 VERSION '16.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbna
328332
CREATE SERVER s7 TYPE 'oracle' VERSION '17.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
329333
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR
330334
ERROR: invalid option "foo"
331-
HINT: Valid options in this context are: authtype, service, connect_timeout, dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib
332335
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbname 's8db');
333336
\des+ :NO_BUILTINS
334337
List of foreign servers
@@ -439,11 +442,10 @@ ERROR: permission denied for foreign-data wrapper foo
439442
RESET ROLE;
440443
ALTER SERVER s8 OPTIONS (foo '1'); -- ERROR option validation
441444
ERROR: invalid option "foo"
442-
HINT: Valid options in this context are: authtype, service, connect_timeout, dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib
443445
ALTER SERVER s8 OPTIONS (connect_timeout '30', SET dbname 'db1', DROP host);
444446
SET ROLE regress_test_role;
445447
ALTER SERVER s1 OWNER TO regress_test_indirect; -- ERROR
446-
ERROR: must be member of role "regress_test_indirect"
448+
ERROR: must be able to SET ROLE "regress_test_indirect"
447449
RESET ROLE;
448450
GRANT regress_test_indirect TO regress_test_role;
449451
SET ROLE regress_test_role;
@@ -596,7 +598,7 @@ ERROR: user mapping for "regress_foreign_data_user" already exists for server "
596598
CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public');
597599
CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 'secret'); -- ERROR
598600
ERROR: invalid option "username"
599-
HINT: Valid options in this context are: user, password
601+
HINT: Perhaps you meant the option "user".
600602
CREATE USER MAPPING FOR user SERVER s8 OPTIONS (user 'test', password 'secret');
601603
ALTER SERVER s5 OWNER TO regress_test_role;
602604
ALTER SERVER s6 OWNER TO regress_test_indirect;
@@ -635,7 +637,7 @@ ALTER USER MAPPING FOR public SERVER s5 OPTIONS (gotcha 'true'); -- E
635637
ERROR: user mapping for "public" does not exist for server "s5"
636638
ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (username 'test'); -- ERROR
637639
ERROR: invalid option "username"
638-
HINT: Valid options in this context are: user, password
640+
HINT: Perhaps you meant the option "user".
639641
ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (DROP user, SET password 'public');
640642
SET ROLE regress_test_role;
641643
ALTER USER MAPPING FOR current_user SERVER s5 OPTIONS (ADD modified '1');
@@ -754,7 +756,8 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
754756
(1 row)
755757

756758
CREATE INDEX id_ft1_c2 ON ft1 (c2); -- ERROR
757-
ERROR: cannot create index on foreign table "ft1"
759+
ERROR: cannot create index on relation "ft1"
760+
DETAIL: This operation is not supported for foreign tables.
758761
SELECT * FROM ft1; -- ERROR
759762
ERROR: foreign-data wrapper "dummy" has no handler
760763
EXPLAIN SELECT * FROM ft1; -- ERROR
@@ -878,7 +881,8 @@ LINE 1: ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7);
878881
^
879882
ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;
880883
ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR
881-
ERROR: "ft1" is not a table
884+
ERROR: ALTER action ALTER CONSTRAINT cannot be performed on relation "ft1"
885+
DETAIL: This operation is not supported for foreign tables.
882886
ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;
883887
ALTER FOREIGN TABLE ft1 DROP CONSTRAINT no_const; -- ERROR
884888
ERROR: constraint "no_const" of relation "ft1" does not exist
@@ -895,7 +899,8 @@ ALTER FOREIGN TABLE ft1 SET SCHEMA foreign_schema;
895899
ALTER FOREIGN TABLE ft1 SET TABLESPACE ts; -- ERROR
896900
ERROR: relation "ft1" does not exist
897901
ALTER FOREIGN TABLE foreign_schema.ft1 SET TABLESPACE ts; -- ERROR
898-
ERROR: "ft1" is not a table, materialized view, index, or partitioned index
902+
ERROR: ALTER action SET TABLESPACE cannot be performed on relation "ft1"
903+
DETAIL: This operation is not supported for foreign tables.
899904
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1;
900905
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
901906
\d foreign_schema.foreign_table_1
@@ -1411,7 +1416,7 @@ CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1)
14111416
c1 | integer | | not null | | plain | |
14121417
c2 | text | | | | extended | |
14131418
c3 | date | | | | plain | |
1414-
Child tables: ft2
1419+
Child tables: ft2, FOREIGN
14151420

14161421
\d+ ft2
14171422
Foreign table "public.ft2"
@@ -1456,7 +1461,7 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
14561461
c1 | integer | | not null | | plain | |
14571462
c2 | text | | | | extended | |
14581463
c3 | date | | | | plain | |
1459-
Child tables: ft2
1464+
Child tables: ft2, FOREIGN
14601465

14611466
\d+ ft2
14621467
Foreign table "public.ft2"
@@ -1492,7 +1497,7 @@ NOTICE: merging column "c3" with inherited definition
14921497
Server: s0
14931498
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
14941499
Inherits: fd_pt1
1495-
Child tables: ft3
1500+
Child tables: ft3, FOREIGN
14961501

14971502
-- start_ignore
14981503
-- GPDB: ct3 is not created.
@@ -1526,7 +1531,8 @@ ALTER TABLE fd_pt1 ADD COLUMN c8 integer;
15261531
c6 | integer | | | | plain | |
15271532
c7 | integer | | not null | | plain | |
15281533
c8 | integer | | | | plain | |
1529-
Child tables: ft2
1534+
Child tables: ft2, FOREIGN
1535+
Distributed by: (c1)
15301536

15311537
\d+ ft2
15321538
Foreign table "public.ft2"
@@ -1543,7 +1549,7 @@ Child tables: ft2
15431549
Server: s0
15441550
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
15451551
Inherits: fd_pt1
1546-
Child tables: ft3
1552+
Child tables: ft3, FOREIGN
15471553

15481554
-- start_ignore
15491555
-- GPDB: ct3 is not created.
@@ -1589,7 +1595,8 @@ ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
15891595
c6 | integer | | not null | | plain | |
15901596
c7 | integer | | | | plain | |
15911597
c8 | text | | | | external | |
1592-
Child tables: ft2
1598+
Child tables: ft2, FOREIGN
1599+
Distributed by: (c1)
15931600

15941601
\d+ ft2
15951602
Foreign table "public.ft2"
@@ -1606,7 +1613,7 @@ Child tables: ft2
16061613
Server: s0
16071614
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
16081615
Inherits: fd_pt1
1609-
Child tables: ft3
1616+
Child tables: ft3, FOREIGN
16101617

16111618
-- drop attributes recursively
16121619
ALTER TABLE fd_pt1 DROP COLUMN c4;
@@ -1621,7 +1628,8 @@ ALTER TABLE fd_pt1 DROP COLUMN c8;
16211628
c1 | integer | | not null | | plain | 10000 |
16221629
c2 | text | | | | extended | |
16231630
c3 | date | | | | plain | |
1624-
Child tables: ft2
1631+
Child tables: ft2, FOREIGN
1632+
Distributed by: (c1)
16251633

16261634
\d+ ft2
16271635
Foreign table "public.ft2"
@@ -1633,7 +1641,7 @@ Child tables: ft2
16331641
Server: s0
16341642
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
16351643
Inherits: fd_pt1
1636-
Child tables: ft3
1644+
Child tables: ft3, FOREIGN
16371645

16381646
-- add constraints recursively
16391647
ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
@@ -1660,7 +1668,8 @@ SELECT relname, conname, contype, conislocal, coninhcount, connoinherit
16601668
Check constraints:
16611669
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
16621670
"fd_pt1chk2" CHECK (c2 <> ''::text)
1663-
Child tables: ft2
1671+
Child tables: ft2, FOREIGN
1672+
Distributed by: (c1)
16641673

16651674
\d+ ft2
16661675
Foreign table "public.ft2"
@@ -1674,7 +1683,7 @@ Check constraints:
16741683
Server: s0
16751684
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
16761685
Inherits: fd_pt1
1677-
Child tables: ft3
1686+
Child tables: ft3, FOREIGN
16781687

16791688
DROP FOREIGN TABLE ft2; -- ERROR
16801689
ERROR: cannot drop foreign table ft2 because other objects depend on it
@@ -1703,7 +1712,8 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
17031712
Check constraints:
17041713
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
17051714
"fd_pt1chk2" CHECK (c2 <> ''::text)
1706-
Child tables: ft2
1715+
Child tables: ft2, FOREIGN
1716+
Distributed by: (c1)
17071717

17081718
\d+ ft2
17091719
Foreign table "public.ft2"
@@ -1734,7 +1744,8 @@ ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk3 CHECK (c2 <> '') NOT VALID;
17341744
c3 | date | | | | plain | |
17351745
Check constraints:
17361746
"fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
1737-
Child tables: ft2
1747+
Child tables: ft2, FOREIGN
1748+
Distributed by: (c1)
17381749

17391750
\d+ ft2
17401751
Foreign table "public.ft2"
@@ -1761,7 +1772,8 @@ ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
17611772
c3 | date | | | | plain | |
17621773
Check constraints:
17631774
"fd_pt1chk3" CHECK (c2 <> ''::text)
1764-
Child tables: ft2
1775+
Child tables: ft2, FOREIGN
1776+
Distributed by: (c1)
17651777

17661778
\d+ ft2
17671779
Foreign table "public.ft2"
@@ -1792,7 +1804,8 @@ ALTER TABLE fd_pt1 RENAME CONSTRAINT fd_pt1chk3 TO f2_check;
17921804
f3 | date | | | | plain | |
17931805
Check constraints:
17941806
"f2_check" CHECK (f2 <> ''::text)
1795-
Child tables: ft2
1807+
Child tables: ft2, FOREIGN
1808+
Distributed by: (f1)
17961809

17971810
\d+ ft2
17981811
Foreign table "public.ft2"
@@ -1854,7 +1867,8 @@ CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR VALUES IN (1)
18541867
c2 | text | | | | extended | |
18551868
c3 | date | | | | plain | |
18561869
Partition key: LIST (c1)
1857-
Partitions: fd_pt2_1 FOR VALUES IN (1)
1870+
Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
1871+
Distributed by: (c1)
18581872

18591873
\d+ fd_pt2_1
18601874
Foreign table "public.fd_pt2_1"
@@ -1926,7 +1940,8 @@ ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES IN (1);
19261940
c2 | text | | | | extended | |
19271941
c3 | date | | | | plain | |
19281942
Partition key: LIST (c1)
1929-
Partitions: fd_pt2_1 FOR VALUES IN (1)
1943+
Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
1944+
Distributed by: (c1)
19301945

19311946
\d+ fd_pt2_1
19321947
Foreign table "public.fd_pt2_1"
@@ -1954,7 +1969,8 @@ ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> '');
19541969
c2 | text | | | | extended | |
19551970
c3 | date | | | | plain | |
19561971
Partition key: LIST (c1)
1957-
Partitions: fd_pt2_1 FOR VALUES IN (1)
1972+
Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
1973+
Distributed by: (c1)
19581974

19591975
\d+ fd_pt2_1
19601976
Foreign table "public.fd_pt2_1"

contrib/pax_storage/src/test/regress/expected/privileges.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ GRANT regress_priv_role TO regress_priv_user1 WITH ADMIN OPTION GRANTED BY CURRE
5757
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY foo; -- error
5858
ERROR: role "foo" does not exist
5959
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY regress_priv_user2; -- error
60+
WARNING: role "regress_priv_user1" has not been granted membership in role "regress_priv_role" by role "regress_priv_user2"
6061
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY CURRENT_USER;
6162
REVOKE regress_priv_role FROM regress_priv_user1 GRANTED BY CURRENT_ROLE;
6263
DROP ROLE regress_priv_role;

contrib/pax_storage/src/test/regress/sql/collate.icu.utf8.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* skip test if not UTF8 server encoding or no ICU collations installed */
66
SELECT getdatabaseencoding() <> 'UTF8' OR
7-
(SELECT count(*) FROM pg_collation WHERE collprovider = 'i') = 0
7+
(SELECT count(*) FROM pg_collation WHERE collprovider = 'i' AND collname <> 'unicode') = 0
88
AS skip_test \gset
99
\if :skip_test
1010
\quit

0 commit comments

Comments
 (0)