[PATCH]Comment improvement in publication.sql

Поиск
Список
Период
Сортировка
От tanghy.fnst@fujitsu.com
Тема [PATCH]Comment improvement in publication.sql
Дата
Msg-id OS0PR01MB6113480F937572BF1216DD61FBEF9@OS0PR01MB6113.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: [PATCH]Comment improvement in publication.sql
Список pgsql-hackers
Hi Hackers

When review and test another patch at [1], I found some comments in existing test code of "
src/test/regress/sql/publication.sql" is a little bit confused. 
Attached a patch to fix them, please take a check.

Here is the detail:

Existing code:
CREATE TABLE testpub_tbl2 (id serial primary key, data text);
-- fail - can't add to for all tables publication
ALTER PUBLICATION testpub_foralltables ADD TABLE testpub_tbl2;
-- fail - can't drop from all tables publication
ALTER PUBLICATION testpub_foralltables DROP TABLE testpub_tbl2;
-- fail - can't add to for all tables publication
ALTER PUBLICATION testpub_foralltables SET TABLE pub_test.testpub_nopk;

After patch:
CREATE TABLE testpub_tbl2 (id serial primary key, data text);
-- fail - tables can't be added to or dropped form FOR ALL TABLES publications
ALTER PUBLICATION testpub_foralltables ADD TABLE testpub_tbl2;
ALTER PUBLICATION testpub_foralltables DROP TABLE testpub_tbl2;
ALTER PUBLICATION testpub_foralltables SET TABLE pub_test.testpub_nopk;

You see the comment for SET TABLE is not appropriate.
And above three operations(ADD DROP SET) output the same message as below:
"DETAIL:  Tables cannot be added to or dropped from FOR ALL TABLES publications."

So maybe we can combine the existing three comments to one, thoughts?

Besides, another comment in the same file is not clear enough to me:
-- fail - already added
CREATE PUBLICATION testpub_fortbl FOR TABLE testpub_tbl1;

Maybe it will be better if we use 'already exists'. Thoughts?

[1]
https://www.postgresql.org/message-id/OS0PR01MB6113CC160D0F134448567FDDFBE99%40OS0PR01MB6113.jpnprd01.prod.outlook.com

Regards
Tang

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: John Naylor
Дата:
Сообщение: Re: Speeding up GIST index creation for tsvectors