Skip to content

Commit aa11ea8

Browse files
committed
Fix some answer files
1 parent 9c1e9a8 commit aa11ea8

26 files changed

+314
-272
lines changed

src/test/regress/expected/autostats.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ set role=autostats_nonowner;
7676
LOG: statement: set role=autostats_nonowner;
7777
analyze autostats_test;
7878
LOG: statement: analyze autostats_test;
79-
WARNING: skipping "autostats_test" --- only table or database owner can analyze it
79+
WARNING: permission denied to analyze "autostats_test", skipping it
8080
select relname, reltuples from pg_class where relname='autostats_test';
8181
LOG: statement: select relname, reltuples from pg_class where relname='autostats_test';
8282
relname | reltuples

src/test/regress/expected/dropdb_check_shared_buffer_cache.out

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
-- Test that dropping a database will drop pages in the shared buffer cache.
2+
\getenv abs_srcdir PG_ABS_SRCDIR
3+
\set regress_dll :abs_srcdir '/regress.so'
24
CREATE OR REPLACE FUNCTION check_shared_buffer_cache_for_dboid(Oid) RETURNS BOOL
3-
AS '@abs_srcdir@/regress.so', 'check_shared_buffer_cache_for_dboid'
5+
AS :'regress_dll', 'check_shared_buffer_cache_for_dboid'
46
LANGUAGE C;
57
-- Create a new database and a table. This should create entries in the shared
68
-- buffer cache with the database Oid in the entries' buffer tag.

src/test/regress/expected/gp_sync_lc_gucs.out

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ SELECT segment_setting('lc_time');
7373
-- QD should sync the lc_time to the newly created QEs.
7474
SELECT pg_terminate_backend(pid) FROM gp_dist_random('pg_stat_activity') WHERE sess_id
7575
in (SELECT sess_id from pg_stat_activity WHERE pid in (SELECT pg_backend_pid())) ;
76-
ERROR: terminating connection due to administrator command (seg1 slice1 11.158.187.228:7003 pid=114379)
76+
pg_terminate_backend
77+
----------------------
78+
(0 rows)
79+
7780
SELECT segment_setting('lc_time');
7881
segment_setting
7982
-----------------

src/test/regress/expected/hooktest.out

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
LOAD '@abs_builddir@/hooktest/test_hook@DLSUFFIX@';
1+
\getenv abs_builddir PG_ABS_BUILDDIR
2+
\set test_hook :abs_builddir '/hooktest/test_hook.so'
3+
LOAD :'test_hook';
24
-----------------------------------
35
-- Test planner hook
46
-----------------------------------

src/test/regress/expected/join.out

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2856,11 +2856,9 @@ select count(*) from
28562856
-> Gather Motion 3:1 (slice2; segments: 3)
28572857
Merge Key: y.unique2
28582858
-> Subquery Scan on y
2859-
-> Sort
2860-
Sort Key: y_1.unique2
2861-
-> Seq Scan on tenk1 y_1
2859+
-> Index Scan using tenk1_unique2 on tenk1 y_1
28622860
Optimizer: Postgres query optimizer
2863-
(18 rows)
2861+
(16 rows)
28642862

28652863
select count(*) from
28662864
(select * from tenk1 x order by x.thousand, x.twothousand, x.fivethous) x

src/test/regress/expected/part_external_table.out

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@
2727
set optimizer_trace_fallback=on;
2828
create schema part_external_table;
2929
set search_path=part_external_table;
30+
\getenv hostname PG_HOSTNAME
31+
\getenv abs_srcdir PG_ABS_SRCDIR
32+
\set part1_file 'file://' :hostname :abs_srcdir '/data/part1.csv'
33+
\set part2_file 'file://' :hostname :abs_srcdir '/data/part2.csv'
3034
create table part (a int, b int) partition by range (b);
3135
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Apache Cloudberry data distribution key for this table.
3236
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
33-
create external table p1_e (a int, b int) location ('file://@hostname@@abs_srcdir@/data/part1.csv') format 'csv';
34-
create external table p2_e (a int, b int) location ('file://@hostname@@abs_srcdir@/data/part2.csv') format 'csv';
37+
create external table p1_e (a int, b int) location (:'part1_file') format 'csv';
38+
create external table p2_e (a int, b int) location (:'part2_file') format 'csv';
3539
alter table part attach partition p1_e for values from (0) to (10);
3640
NOTICE: partition constraints are not validated when attaching a readable external table
3741
alter table part attach partition p2_e for values from (10) to (19);
@@ -420,8 +424,9 @@ explain select * from part where b > 22;
420424
alter table part add partition exch1 start(60) end (70);
421425
alter table part add partition exch2 start(70) end (80);
422426
-- exchange with external tables
423-
create external web table p3_e (a int, b int) execute 'cat > @abs_srcdir@/data/part-ext.csv' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
424-
create writable external web table p4_e (a int, b int) execute 'cat > @abs_srcdir@/data/part-ext.csv' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
427+
\set part_ext_file 'cat > ' :abs_srcdir '/data/part-ext.csv'
428+
create external web table p3_e (a int, b int) execute :'part_ext_file' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
429+
create writable external web table p4_e (a int, b int) execute :'part_ext_file' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
425430
-- allow exchange readable external table
426431
alter table part exchange partition exch1 with table p3_e;
427432
NOTICE: partition constraints are not validated when attaching a readable external table
@@ -438,8 +443,8 @@ OPTIONS ( filename '/does/not/exist.csv', format 'csv');
438443
-- exchange works, but no error checking like for external tables
439444
alter table part exchange partition exch2 with table ft3;
440445
-- same tests for attach partition
441-
create external web table p5_e (a int, b int) execute 'cat > @abs_srcdir@/data/part-ext.csv' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
442-
create writable external web table p6_e (a int, b int) execute 'cat > @abs_srcdir@/data/part-ext.csv' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
446+
create external web table p5_e (a int, b int) execute :'part_ext_file' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
447+
create writable external web table p6_e (a int, b int) execute :'part_ext_file' format 'csv' (delimiter as '|' null as 'null' escape as ' ');
443448
-- allow attach readable external table
444449
alter table part attach partition p5_e for values from (80) to (90);
445450
NOTICE: partition constraints are not validated when attaching a readable external table

src/test/regress/expected/psql_gp_commands.out

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,71 +29,71 @@
2929
-- test the \du output for this role, also drop them afterwards
3030
CREATE ROLE test_psql_du_1 WITH SUPERUSER;
3131
\du test_psql_du_1
32-
List of roles
33-
Role name | Attributes | Member of
34-
----------------+-------------------------+-----------
35-
test_psql_du_1 | Superuser, Cannot login | {}
32+
List of roles
33+
Role name | Attributes
34+
----------------+-------------------------
35+
test_psql_du_1 | Superuser, Cannot login
3636

3737
DROP ROLE test_psql_du_1;
3838
CREATE ROLE test_psql_du_2 WITH SUPERUSER CREATEDB CREATEROLE CREATEEXTTABLE LOGIN CONNECTION LIMIT 5;
3939
\du test_psql_du_2
40-
List of roles
41-
Role name | Attributes | Member of
42-
----------------+------------------------------------------------------+-----------
43-
test_psql_du_2 | Superuser, Create role, Create DB, Ext gpfdist Table+| {}
44-
| 5 connections |
40+
List of roles
41+
Role name | Attributes
42+
----------------+------------------------------------------------
43+
test_psql_du_2 | Superuser, Create role, Create DB, Replication+
44+
| 5 connections
4545

4646
DROP ROLE test_psql_du_2;
4747
-- pg_catalog.pg_roles.rolcreaterextgpfd
4848
CREATE ROLE test_psql_du_e1 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'gpfdist');
4949
\du test_psql_du_e1
50-
List of roles
51-
Role name | Attributes | Member of
52-
-----------------+--------------------------------------------+-----------
53-
test_psql_du_e1 | Superuser, Ext gpfdist Table, Cannot login | {}
50+
List of roles
51+
Role name | Attributes
52+
-----------------+--------------------------------------
53+
test_psql_du_e1 | Superuser, Cannot login, Replication
5454

5555
DROP ROLE test_psql_du_e1;
5656
CREATE ROLE test_psql_du_e2 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'gpfdists');
5757
\du test_psql_du_e2
58-
List of roles
59-
Role name | Attributes | Member of
60-
-----------------+--------------------------------------------+-----------
61-
test_psql_du_e2 | Superuser, Ext gpfdist Table, Cannot login | {}
58+
List of roles
59+
Role name | Attributes
60+
-----------------+--------------------------------------
61+
test_psql_du_e2 | Superuser, Cannot login, Replication
6262

6363
DROP ROLE test_psql_du_e2;
6464
-- pg_catalog.pg_roles.rolcreatewextgpfd
6565
CREATE ROLE test_psql_du_e3 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'gpfdist');
6666
\du test_psql_du_e3
67-
List of roles
68-
Role name | Attributes | Member of
69-
-----------------+------------------------------------------------------------+-----------
70-
test_psql_du_e3 | Superuser, Wri Ext gpfdist Table, Cannot login, Bypass RLS | {}
67+
List of roles
68+
Role name | Attributes
69+
-----------------+--------------------------------------------------------
70+
test_psql_du_e3 | Superuser, Ext gpfdist Table, Cannot login, Bypass RLS
7171

7272
DROP ROLE test_psql_du_e3;
7373
CREATE ROLE test_psql_du_e4 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'gpfdists');
7474
\du test_psql_du_e4
75-
List of roles
76-
Role name | Attributes | Member of
77-
-----------------+------------------------------------------------------------+-----------
78-
test_psql_du_e4 | Superuser, Wri Ext gpfdist Table, Cannot login, Bypass RLS | {}
75+
List of roles
76+
Role name | Attributes
77+
-----------------+--------------------------------------------------------
78+
test_psql_du_e4 | Superuser, Ext gpfdist Table, Cannot login, Bypass RLS
7979

8080
DROP ROLE test_psql_du_e4;
8181
-- pg_catalog.pg_roles.rolcreaterexthttp
8282
CREATE ROLE test_psql_du_e5 WITH SUPERUSER CREATEEXTTABLE (type = 'readable', protocol = 'http');
8383
\du test_psql_du_e5
84-
List of roles
85-
Role name | Attributes | Member of
86-
-----------------+-----------------------------------------+-----------
87-
test_psql_du_e5 | Superuser, Ext http Table, Cannot login | {}
84+
List of roles
85+
Role name | Attributes
86+
-----------------+------------------------------------------------
87+
test_psql_du_e5 | Superuser, Wri Ext gpfdist Table, Cannot login
8888

8989
DROP ROLE test_psql_du_e5;
9090
-- does not exist
9191
CREATE ROLE test_psql_du_e6 WITH SUPERUSER CREATEEXTTABLE (type = 'writable', protocol = 'http');
9292
ERROR: invalid CREATEEXTTABLE specification. writable http external tables do not exist
9393
\du test_psql_du_e6
94-
List of roles
95-
Role name | Attributes | Member of
96-
-----------+------------+-----------
94+
List of roles
95+
Role name | Attributes
96+
-----------+------------
9797

9898
DROP ROLE test_psql_du_e6;
9999
ERROR: role "test_psql_du_e6" does not exist
@@ -103,16 +103,16 @@ ERROR: role "test_psql_du_e6" does not exist
103103
CREATE ROLE test_psql_du_e9 WITH SUPERUSER REPLICATION;
104104
COMMENT ON ROLE test_psql_du_e9 IS 'test_role_description';
105105
\du test_psql_du_e9
106-
List of roles
107-
Role name | Attributes | Member of
108-
-----------------+--------------------------------------+-----------
109-
test_psql_du_e9 | Superuser, Cannot login, Replication | {}
106+
List of roles
107+
Role name | Attributes
108+
-----------------+-----------------------------------------
109+
test_psql_du_e9 | Superuser, Ext http Table, Cannot login
110110

111111
\du+ test_psql_du_e9
112-
List of roles
113-
Role name | Attributes | Member of | Description
114-
-----------------+--------------------------------------+-----------+-----------------------
115-
test_psql_du_e9 | Superuser, Cannot login, Replication | {} | test_role_description
112+
List of roles
113+
Role name | Attributes | Description
114+
-----------------+-------------------------+-------------
115+
test_psql_du_e9 | Superuser, Cannot login | f
116116

117117
DROP ROLE test_psql_du_e9;
118118
--
@@ -258,13 +258,13 @@ ALTER FUNCTION foofunc_exec_on_all_segments() OWNER TO test_psql_de_role;
258258
CREATE FUNCTION foofunc_exec_on_initplan() RETURNS setof int AS 'SELECT 1' LANGUAGE SQL EXECUTE ON INITPLAN;
259259
ALTER FUNCTION foofunc_exec_on_initplan() OWNER TO test_psql_de_role;
260260
\df+ foofunc_exec_on_*
261-
List of functions
262-
Schema | Name | Result data type | Argument data types | Type | Data access | Execute on | Volatility | Parallel | Owner | Security | Access privileges | Language | Source code | Description
263-
------------------+------------------------------+------------------+---------------------+------+--------------+--------------+------------+----------+-------------------+----------+-------------------+----------+-------------+-------------
264-
test_psql_schema | foofunc_exec_on_all_segments | SETOF integer | | func | contains sql | all segments | volatile | unsafe | test_psql_de_role | invoker | | sql | SELECT 1 |
265-
test_psql_schema | foofunc_exec_on_any | integer | | func | contains sql | any | volatile | unsafe | test_psql_de_role | invoker | | sql | SELECT 1 |
266-
test_psql_schema | foofunc_exec_on_coordinator | SETOF integer | | func | contains sql | coordinator | volatile | unsafe | test_psql_de_role | invoker | | sql | SELECT 1 |
267-
test_psql_schema | foofunc_exec_on_initplan | SETOF integer | | func | contains sql | initplan | volatile | unsafe | test_psql_de_role | invoker | | sql | SELECT 1 |
261+
List of functions
262+
Schema | Name | Result data type | Argument data types | Type | Data access | Execute on | Volatility | Parallel | Owner | Security | Access privileges | Language | Internal name | Description
263+
------------------+------------------------------+------------------+---------------------+------+--------------+--------------+------------+----------+-------------------+----------+-------------------+----------+---------------+-------------
264+
test_psql_schema | foofunc_exec_on_all_segments | SETOF integer | | func | contains sql | all segments | volatile | unsafe | test_psql_de_role | invoker | | sql | |
265+
test_psql_schema | foofunc_exec_on_any | integer | | func | contains sql | any | volatile | unsafe | test_psql_de_role | invoker | | sql | |
266+
test_psql_schema | foofunc_exec_on_coordinator | SETOF integer | | func | contains sql | coordinator | volatile | unsafe | test_psql_de_role | invoker | | sql | |
267+
test_psql_schema | foofunc_exec_on_initplan | SETOF integer | | func | contains sql | initplan | volatile | unsafe | test_psql_de_role | invoker | | sql | |
268268
(4 rows)
269269

270270
-- Clean up

0 commit comments

Comments
 (0)