Hi Sawada-San.
Here are some review comments for the v3-0001 test code.
======
src/test/regress/expected/publication.out
1.
+-- Clean up
+DROP FUNCTION test_gpt(text[], relname);
+ERROR: type "relname" does not exist
This seems a mistake. If the DROP FUNCTION was differently written
there there would be no error. PSA.
======
src/test/regress/sql/publication.sql
2.
+SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
+SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
These tests seem strangely different from all the others because
everything else has both a "good result" test and a "no result" test
for every publication.
So I think there should be a "no result" test for 'pub_normal'
So I think there should be a "good result" test for 'pub_schema'
~~~
3.
Consider renaming that 'tbl_parent' to something like 'tbl_root'.
because 'parent' always makes me think of INHERITED parent/child
tables, rather than partitioned tables and their partitions. If you do
this, then you might also want to tweak several publication names --
e.g. 'pub_part_parent' -> 'pub_part_root'
~~~
PSA a diff file that makes those suggested changes #1 and #2.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
diff --git a/src/test/regress/expected/publication.out
b/src/test/regress/expected/publication.out
index 3dded67ab98..60033ea2fff 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -2307,6 +2307,17 @@ SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
pub_normal | tbl_normal | 1 | (id < 10)
(1 row)
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+ pubname | relname | attrs | qual
+---------+---------+-------+------
+(0 rows)
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
+ pubname | relname | attrs | qual
+------------+---------+-------+------
+ pub_schema | tbl_sch | 1 |
+(1 row)
+
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
pubname | relname | attrs | qual
---------+---------+-------+------
@@ -2389,8 +2400,7 @@ SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
(1 row)
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
-ERROR: type "relname" does not exist
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;
diff --git a/src/test/regress/sql/publication.sql
b/src/test/regress/sql/publication.sql
index 10fd97fe544..9801179e645 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -1463,6 +1463,9 @@ BEGIN ATOMIC
END;
SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
SELECT * FROM test_gpt('pub_part_parent', 'tbl_parent');
@@ -1486,7 +1489,7 @@ SELECT * FROM test_gpt('pub_all_novia_root',
'tbl_parent'); -- no result
SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;