Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directory_table: matchignore & remove meta-command username output #464

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/test/regress/init_file
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ m/^WARNING: table ".*" contains rows in segment .*, which is outside the # of s
# The following output is generated by \d on foreign tables, so ignore it.
m/Distributed by: \(.*\)/
m/Distributed randomly/

# directory_table test output is sensitive to the user running the tests
m/^NOTICE:.*storage user mapping for .* does not exist for storage server/
m/^DETAIL:.*storage server of storage user mapping for .* on storage server/
m/^(?:ERROR|NOTICE):.*storage user mapping for .* already exists for storage server/
-- end_matchignore

-- start_matchsubs
Expand Down
4 changes: 0 additions & 4 deletions src/test/regress/input/directory_table.source
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,12 @@ CREATE DIRECTORY TABLE IF NOT EXISTS dir_table2 TABLESPACE directory_tblspc;
CREATE DIRECTORY TABLE dir_table5 TABLESPACE directory_tblspc;
CREATE DIRECTORY TABLE dir_table6 TABLESPACE pg_default;

\dY
SELECT count(*) FROM pg_directory_table;
SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname like '%dir_table%' ORDER BY 1;
\d+ dir_table1;
\d+ dir_table2;
\d+ dir_table3;
\c dirtable_db
\dY
SELECT count(*) FROM pg_directory_table;
SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname like '%dir_table%' ORDER BY 1;
\c regression
Expand All @@ -231,11 +229,9 @@ DROP DIRECTORY TABLE dir_table4; -- fail
DROP DIRECTORY TABLE IF EXISTS dir_table5;
DROP DIRECTORY TABLE IF EXISTS dir_table5; -- skip

\dY
SELECT count(*) FROM pg_directory_table;
SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname like '%dir_table%' ORDER BY 1;
\c dirtable_db
\dY
SELECT count(*) FROM pg_directory_table;
SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname like '%dir_table%' ORDER BY 1;
\c regression
Expand Down
34 changes: 0 additions & 34 deletions src/test/regress/output/directory_table.source
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,6 @@ CREATE DIRECTORY TABLE IF NOT EXISTS dir_table2 TABLESPACE directory_tblspc;
NOTICE: relation "dir_table2" already exists, skipping
CREATE DIRECTORY TABLE dir_table5 TABLESPACE directory_tblspc;
CREATE DIRECTORY TABLE dir_table6 TABLESPACE pg_default;
\dY
List of relations
Schema | Name | Type | Owner
--------+------------+-----------------+---------
public | dir_table1 | directory table | gpadmin
public | dir_table2 | directory table | gpadmin
public | dir_table3 | directory table | gpadmin
public | dir_table4 | directory table | gpadmin
public | dir_table5 | directory table | gpadmin
public | dir_table6 | directory table | gpadmin
(6 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down Expand Up @@ -603,12 +591,6 @@ Indexes:
Distributed by: (relative_path)

\c dirtable_db
\dY
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down Expand Up @@ -643,16 +625,6 @@ ERROR: directory table "dir_table4" does not exist
DROP DIRECTORY TABLE IF EXISTS dir_table5;
DROP DIRECTORY TABLE IF EXISTS dir_table5; -- skip
NOTICE: directory table "dir_table5" does not exist, skipping
\dY
List of relations
Schema | Name | Type | Owner
--------+------------+-----------------+---------
public | dir_table1 | directory table | gpadmin
public | dir_table2 | directory table | gpadmin
public | dir_table3 | directory table | gpadmin
public | dir_table6 | directory table | gpadmin
(4 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand All @@ -673,12 +645,6 @@ SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname
(8 rows)

\c dirtable_db
\dY
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down
34 changes: 0 additions & 34 deletions src/test/regress/output/directory_table_optimizer.source
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,6 @@ CREATE DIRECTORY TABLE IF NOT EXISTS dir_table2 TABLESPACE directory_tblspc;
NOTICE: relation "dir_table2" already exists, skipping
CREATE DIRECTORY TABLE dir_table5 TABLESPACE directory_tblspc;
CREATE DIRECTORY TABLE dir_table6 TABLESPACE pg_default;
\dY
List of relations
Schema | Name | Type | Owner
--------+------------+-----------------+---------
public | dir_table1 | directory table | gpadmin
public | dir_table2 | directory table | gpadmin
public | dir_table3 | directory table | gpadmin
public | dir_table4 | directory table | gpadmin
public | dir_table5 | directory table | gpadmin
public | dir_table6 | directory table | gpadmin
(6 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down Expand Up @@ -603,12 +591,6 @@ Indexes:
Distributed by: (relative_path)

\c dirtable_db
\dY
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down Expand Up @@ -643,16 +625,6 @@ ERROR: directory table "dir_table4" does not exist
DROP DIRECTORY TABLE IF EXISTS dir_table5;
DROP DIRECTORY TABLE IF EXISTS dir_table5; -- skip
NOTICE: directory table "dir_table5" does not exist, skipping
\dY
List of relations
Schema | Name | Type | Owner
--------+------------+-----------------+---------
public | dir_table1 | directory table | gpadmin
public | dir_table2 | directory table | gpadmin
public | dir_table3 | directory table | gpadmin
public | dir_table6 | directory table | gpadmin
(4 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand All @@ -673,12 +645,6 @@ SELECT relname, relisshared, relpersistence, relkind FROM pg_class WHERE relname
(8 rows)

\c dirtable_db
\dY
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)

SELECT count(*) FROM pg_directory_table;
count
-------
Expand Down
Loading