Re: Added schema level support for publication.

Поиск
Список
Период
Сортировка
От Greg Nancarrow
Тема Re: Added schema level support for publication.
Дата
Msg-id CAJcOf-daZxKSyCGCbr2=Bx36uRAzHrPSNzWem4G7fNZPwWhqTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Added schema level support for publication.  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Added schema level support for publication.
Список pgsql-hackers
On Fri, Jul 23, 2021 at 10:16 PM vignesh C <vignesh21@gmail.com> wrote:
>
> I have changed it to pg_pubication_schema as earlier as both you and Houzj San felt pg_publication_schema was better.
Thisis fixed in the v14 patch attached at [1].
 
> [1] - https://www.postgresql.org/message-id/CALDaNm3DTj535ezfmm8QHLOtOkcHF2ZcCfSjfR%3DVbTbLZXFRsA%40mail.gmail.com
>

Thanks, I think it looks better.

On another issue, there seems to be problems with pg_dump support for
FOR SCHEMA publications.

For example:

   CREATE PUBLICATION p FOR SCHEMA myschema;

pg_dump is dumping:

   CREATE PUBLICATION p WITH (publish = 'insert, update, delete, truncate');
   ...
   ALTER PUBLICATION p ADD SCHEMA p;

Obviously that last line should instead be "ALTER PUBLICATION p ADD
SCHEMA myschema;"

I think the bug is caused by the following:

+ appendPQExpBuffer(query,
+   "ALTER PUBLICATION %s ADD SCHEMA %s;\n",
+   fmtId(pubsinfo->pubname), fmtId(schemainfo->dobj.name));

The comment for fmtId() says:

    *  Note that the returned string must be used before calling fmtId again,
    *  since we re-use the same return buffer each time.

So I think there was a reason why the ALTER PUBLICATION and ADD SCHEMA
were previously formatted separately (and so should NOT have been
combined).
It should be restored to how it was in the previous patch version.


Regards,
Greg Nancarrow
Fujitsu Australia



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Removing "long int"-related limit on hash table sizes
Следующее
От: David Rowley
Дата:
Сообщение: Re: Outdated comment in get_agg_clause_costs