This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new 29b3a288bda Fix some answer files for pax storage
29b3a288bda is described below

commit 29b3a288bda1b5ca9b44bda87023f9585060c47a
Author: Jinbao Chen <[email protected]>
AuthorDate: Mon Mar 16 23:42:47 2026 -0400

    Fix some answer files for pax storage
---
 .../test/regress/expected/collate.icu.utf8_1.out   |  2 +-
 .../src/test/regress/expected/foreign_data.out     | 68 +++++++++++++---------
 .../src/test/regress/expected/privileges.out       |  1 +
 .../src/test/regress/sql/collate.icu.utf8.sql      |  2 +-
 4 files changed, 45 insertions(+), 28 deletions(-)

diff --git 
a/contrib/pax_storage/src/test/regress/expected/collate.icu.utf8_1.out 
b/contrib/pax_storage/src/test/regress/expected/collate.icu.utf8_1.out
index a6a33b39aba..25c99c4abf0 100644
--- a/contrib/pax_storage/src/test/regress/expected/collate.icu.utf8_1.out
+++ b/contrib/pax_storage/src/test/regress/expected/collate.icu.utf8_1.out
@@ -3,7 +3,7 @@
  */
 /* skip test if not UTF8 server encoding or no ICU collations installed */
 SELECT getdatabaseencoding() <> 'UTF8' OR
-       (SELECT count(*) FROM pg_collation WHERE collprovider = 'i') = 0
+       (SELECT count(*) FROM pg_collation WHERE collprovider = 'i' AND 
collname <> 'unicode') = 0
        AS skip_test \gset
 \if :skip_test
 \quit
diff --git a/contrib/pax_storage/src/test/regress/expected/foreign_data.out 
b/contrib/pax_storage/src/test/regress/expected/foreign_data.out
index 374d5077247..8651bbfc1eb 100644
--- a/contrib/pax_storage/src/test/regress/expected/foreign_data.out
+++ b/contrib/pax_storage/src/test/regress/expected/foreign_data.out
@@ -109,6 +109,8 @@ CREATE FOREIGN DATA WRAPPER test_fdw HANDLER 
invalid_fdw_handler;  -- ERROR
 ERROR:  function invalid_fdw_handler must return type fdw_handler
 CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER 
invalid_fdw_handler;  -- ERROR
 ERROR:  conflicting or redundant options
+LINE 1: ...GN DATA WRAPPER test_fdw HANDLER test_fdw_handler HANDLER in...
+                                                             ^
 CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler;
 DROP FOREIGN DATA WRAPPER test_fdw;
 -- ALTER FOREIGN DATA WRAPPER
@@ -215,6 +217,8 @@ ALTER FOREIGN DATA WRAPPER foo HANDLER invalid_fdw_handler; 
 -- ERROR
 ERROR:  function invalid_fdw_handler must return type fdw_handler
 ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER anything;  -- 
ERROR
 ERROR:  conflicting or redundant options
+LINE 1: ...FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler HANDLER an...
+                                                             ^
 ALTER FOREIGN DATA WRAPPER foo HANDLER test_fdw_handler;
 WARNING:  changing the foreign-data wrapper handler can change behavior of 
existing foreign tables
 DROP FUNCTION invalid_fdw_handler();
@@ -328,7 +332,6 @@ CREATE SERVER s6 VERSION '16.0' FOREIGN DATA WRAPPER foo 
OPTIONS (host 'a', dbna
 CREATE SERVER s7 TYPE 'oracle' VERSION '17.0' FOREIGN DATA WRAPPER foo OPTIONS 
(host 'a', dbname 'b');
 CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR
 ERROR:  invalid option "foo"
-HINT:  Valid options in this context are: authtype, service, connect_timeout, 
dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib
 CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', 
dbname 's8db');
 \des+ :NO_BUILTINS
                                                              List of foreign 
servers
@@ -439,11 +442,10 @@ ERROR:  permission denied for foreign-data wrapper foo
 RESET ROLE;
 ALTER SERVER s8 OPTIONS (foo '1');                          -- ERROR option 
validation
 ERROR:  invalid option "foo"
-HINT:  Valid options in this context are: authtype, service, connect_timeout, 
dbname, host, hostaddr, port, tty, options, requiressl, sslmode, gsslib
 ALTER SERVER s8 OPTIONS (connect_timeout '30', SET dbname 'db1', DROP host);
 SET ROLE regress_test_role;
 ALTER SERVER s1 OWNER TO regress_test_indirect;             -- ERROR
-ERROR:  must be member of role "regress_test_indirect"
+ERROR:  must be able to SET ROLE "regress_test_indirect"
 RESET ROLE;
 GRANT regress_test_indirect TO regress_test_role;
 SET ROLE regress_test_role;
@@ -596,7 +598,7 @@ ERROR:  user mapping for "regress_foreign_data_user" 
already exists for server "
 CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public');
 CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 
'secret');    -- ERROR
 ERROR:  invalid option "username"
-HINT:  Valid options in this context are: user, password
+HINT:  Perhaps you meant the option "user".
 CREATE USER MAPPING FOR user SERVER s8 OPTIONS (user 'test', password 
'secret');
 ALTER SERVER s5 OWNER TO regress_test_role;
 ALTER SERVER s6 OWNER TO regress_test_indirect;
@@ -635,7 +637,7 @@ ALTER USER MAPPING FOR public SERVER s5 OPTIONS (gotcha 
'true');            -- E
 ERROR:  user mapping for "public" does not exist for server "s5"
 ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (username 'test');    -- 
ERROR
 ERROR:  invalid option "username"
-HINT:  Valid options in this context are: user, password
+HINT:  Perhaps you meant the option "user".
 ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (DROP user, SET password 
'public');
 SET ROLE regress_test_role;
 ALTER USER MAPPING FOR current_user SERVER s5 OPTIONS (ADD modified '1');
@@ -754,7 +756,8 @@ FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 (1 row)
 
 CREATE INDEX id_ft1_c2 ON ft1 (c2);                             -- ERROR
-ERROR:  cannot create index on foreign table "ft1"
+ERROR:  cannot create index on relation "ft1"
+DETAIL:  This operation is not supported for foreign tables.
 SELECT * FROM ft1;                                              -- ERROR
 ERROR:  foreign-data wrapper "dummy" has no handler
 EXPLAIN SELECT * FROM ft1;                                      -- ERROR
@@ -878,7 +881,8 @@ LINE 1: ALTER FOREIGN TABLE ft1 ADD PRIMARY KEY (c7);
                                     ^
 ALTER FOREIGN TABLE ft1 ADD CONSTRAINT ft1_c9_check CHECK (c9 < 0) NOT VALID;
 ALTER FOREIGN TABLE ft1 ALTER CONSTRAINT ft1_c9_check DEFERRABLE; -- ERROR
-ERROR:  "ft1" is not a table
+ERROR:  ALTER action ALTER CONSTRAINT cannot be performed on relation "ft1"
+DETAIL:  This operation is not supported for foreign tables.
 ALTER FOREIGN TABLE ft1 DROP CONSTRAINT ft1_c9_check;
 ALTER FOREIGN TABLE ft1 DROP CONSTRAINT no_const;               -- ERROR
 ERROR:  constraint "no_const" of relation "ft1" does not exist
@@ -895,7 +899,8 @@ ALTER FOREIGN TABLE ft1 SET SCHEMA foreign_schema;
 ALTER FOREIGN TABLE ft1 SET TABLESPACE ts;                      -- ERROR
 ERROR:  relation "ft1" does not exist
 ALTER FOREIGN TABLE foreign_schema.ft1 SET TABLESPACE ts;       -- ERROR
-ERROR:  "ft1" is not a table, materialized view, index, or partitioned index
+ERROR:  ALTER action SET TABLESPACE cannot be performed on relation "ft1"
+DETAIL:  This operation is not supported for foreign tables.
 ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1;
 ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
 \d foreign_schema.foreign_table_1
@@ -1411,7 +1416,7 @@ CREATE FOREIGN TABLE ft2 () INHERITS (fd_pt1)
  c1     | integer |           | not null |         | plain    |              | 
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
-Child tables: ft2
+Child tables: ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1456,7 +1461,7 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
  c1     | integer |           | not null |         | plain    |              | 
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
-Child tables: ft2
+Child tables: ft2, FOREIGN
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1492,7 +1497,7 @@ NOTICE:  merging column "c3" with inherited definition
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ft3
+Child tables: ft3, FOREIGN
 
 -- start_ignore
 -- GPDB: ct3 is not created.
@@ -1526,7 +1531,8 @@ ALTER TABLE fd_pt1 ADD COLUMN c8 integer;
  c6     | integer |           |          |         | plain    |              | 
  c7     | integer |           | not null |         | plain    |              | 
  c8     | integer |           |          |         | plain    |              | 
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1543,7 +1549,7 @@ Child tables: ft2
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ft3
+Child tables: ft3, FOREIGN
 
 -- start_ignore
 -- GPDB: ct3 is not created.
@@ -1589,7 +1595,8 @@ ALTER TABLE fd_pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL;
  c6     | integer |           | not null |         | plain    |              | 
  c7     | integer |           |          |         | plain    |              | 
  c8     | text    |           |          |         | external |              | 
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1606,7 +1613,7 @@ Child tables: ft2
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ft3
+Child tables: ft3, FOREIGN
 
 -- drop attributes recursively
 ALTER TABLE fd_pt1 DROP COLUMN c4;
@@ -1621,7 +1628,8 @@ ALTER TABLE fd_pt1 DROP COLUMN c8;
  c1     | integer |           | not null |         | plain    | 10000        | 
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1633,7 +1641,7 @@ Child tables: ft2
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ft3
+Child tables: ft3, FOREIGN
 
 -- add constraints recursively
 ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
@@ -1660,7 +1668,8 @@ SELECT relname, conname, contype, conislocal, 
coninhcount, connoinherit
 Check constraints:
     "fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
     "fd_pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1674,7 +1683,7 @@ Check constraints:
 Server: s0
 FDW options: (delimiter ',', quote '"', "be quoted" 'value')
 Inherits: fd_pt1
-Child tables: ft3
+Child tables: ft3, FOREIGN
 
 DROP FOREIGN TABLE ft2; -- ERROR
 ERROR:  cannot drop foreign table ft2 because other objects depend on it
@@ -1703,7 +1712,8 @@ ALTER FOREIGN TABLE ft2 INHERIT fd_pt1;
 Check constraints:
     "fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
     "fd_pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1734,7 +1744,8 @@ ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk3 CHECK (c2 <> 
'') NOT VALID;
  c3     | date    |           |          |         | plain    |              | 
 Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1761,7 +1772,8 @@ ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3;
  c3     | date    |           |          |         | plain    |              | 
 Check constraints:
     "fd_pt1chk3" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (c1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1792,7 +1804,8 @@ ALTER TABLE fd_pt1 RENAME CONSTRAINT fd_pt1chk3 TO 
f2_check;
  f3     | date    |           |          |         | plain    |              | 
 Check constraints:
     "f2_check" CHECK (f2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
+Distributed by: (f1)
 
 \d+ ft2
                                        Foreign table "public.ft2"
@@ -1854,7 +1867,8 @@ CREATE FOREIGN TABLE fd_pt2_1 PARTITION OF fd_pt2 FOR 
VALUES IN (1)
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
 Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Distributed by: (c1)
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -1926,7 +1940,8 @@ ALTER TABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FOR VALUES 
IN (1);
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
 Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Distributed by: (c1)
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
@@ -1954,7 +1969,8 @@ ALTER TABLE fd_pt2_1 ADD CONSTRAINT p21chk CHECK (c2 <> 
'');
  c2     | text    |           |          |         | extended |              | 
  c3     | date    |           |          |         | plain    |              | 
 Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
+Distributed by: (c1)
 
 \d+ fd_pt2_1
                                      Foreign table "public.fd_pt2_1"
diff --git a/contrib/pax_storage/src/test/regress/expected/privileges.out 
b/contrib/pax_storage/src/test/regress/expected/privileges.out
index 1c4624db9b4..360c4aa440d 100644
--- a/contrib/pax_storage/src/test/regress/expected/privileges.out
+++ b/contrib/pax_storage/src/test/regress/expected/privileges.out
@@ -57,6 +57,7 @@ GRANT regress_priv_role TO regress_priv_user1 WITH ADMIN 
OPTION GRANTED BY CURRE
 REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY 
foo; -- error
 ERROR:  role "foo" does not exist
 REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY 
regress_priv_user2; -- error
+WARNING:  role "regress_priv_user1" has not been granted membership in role 
"regress_priv_role" by role "regress_priv_user2"
 REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY 
CURRENT_USER;
 REVOKE regress_priv_role FROM regress_priv_user1 GRANTED BY CURRENT_ROLE;
 DROP ROLE regress_priv_role;
diff --git a/contrib/pax_storage/src/test/regress/sql/collate.icu.utf8.sql 
b/contrib/pax_storage/src/test/regress/sql/collate.icu.utf8.sql
index 9cee3d0042b..1ba15eb3e78 100644
--- a/contrib/pax_storage/src/test/regress/sql/collate.icu.utf8.sql
+++ b/contrib/pax_storage/src/test/regress/sql/collate.icu.utf8.sql
@@ -4,7 +4,7 @@
 
 /* skip test if not UTF8 server encoding or no ICU collations installed */
 SELECT getdatabaseencoding() <> 'UTF8' OR
-       (SELECT count(*) FROM pg_collation WHERE collprovider = 'i') = 0
+       (SELECT count(*) FROM pg_collation WHERE collprovider = 'i' AND 
collname <> 'unicode') = 0
        AS skip_test \gset
 \if :skip_test
 \quit


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to