Re: why can't a table be part of the same publication as its schema

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: why can't a table be part of the same publication as its schema
Дата
Msg-id 917B3A3D-AEA5-4613-88D8-08155DA28CB5@enterprisedb.com
обсуждение исходный текст
Ответ на Re: why can't a table be part of the same publication as its schema  (Robert Haas <robertmhaas@gmail.com>)
Ответы RE: why can't a table be part of the same publication as its schema  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Список pgsql-hackers

> On Sep 10, 2022, at 4:17 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
>>> I don't understand why we
>>> used this ALL TABLES IN SCHEMA language.
>>
>> The conversation, as I recall, was that "ADD SCHEMA foo" would only mean all tables in foo, until publication of
otherobject types became supported, at which point "ADD SCHEMA foo" would suddenly mean more than it did before.
Peoplemight find that surprising, so the "ALL TABLES IN" was intended to future-proof against surprising behavioral
changes.
>
> If I encountered this syntax in a vacuum, that's not what I would
> think. I would think that ADD ALL TABLES IN SCHEMA meant add all the
> tables in the schema to the publication one by one as individual
> objects

Yes, it appears the syntax was chosen to avoid one kind of confusion, but created another kind.  Per the docs on this
feature:

  FOR ALL TABLES IN SCHEMA
  Marks the publication as one that replicates changes for all tables in the specified list of schemas, including
tablescreated in the future. 

Like you, I wouldn't expect that definition, given the behavior of GRANT with respect to the same grammatical
construction.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] initdb: do not exit after warn_on_mount_point
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Splitting up guc.c