Re: Ambiguous description on new columns

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: Ambiguous description on new columns
Дата
Msg-id CAHut+PvMTUCAwHG=S5y0_mTc0jmADbbmEQYstw7ckoZNjaHbqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Ambiguous description on new columns  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Ambiguous description on new columns
Список pgsql-docs
On Wed, May 22, 2024 at 1:22 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Tue, May 21, 2024 at 7:48 PM Peter Smith <smithpb2250@gmail.com> wrote:
>>
>>
>> I think the following small change will remove any ambiguity:
>>
>> BEFORE
>> If no column list is specified, any columns added later are
>> automatically replicated.
>>
>> SUGGESTION
>> If no column list is specified, any columns added to the table later
>> are automatically replicated.
>>
>> ~~
>>
>
> Extended Before:
>
> Each publication can optionally specify which columns of each table are replicated to subscribers. The table on the
subscriberside must have at least all the columns that are published. If no column list is specified, then all columns
onthe publisher are replicated. See CREATE PUBLICATION for details on the syntax. 
>
> The choice of columns can be based on behavioral or performance reasons. However, do not rely on this feature for
security:a malicious subscriber is able to obtain data from columns that are not specifically published. If security is
aconsideration, protections can be applied at the publisher side. 
>
> If no column list is specified, any columns added later are automatically replicated. This means that having a column
listwhich names all columns is not the same as having no column list at all. 
>
> I'd suggest:
>
> Each publication can optionally specify which columns of each table are replicated to subscribers. The table on the
subscriberside must have at least all the columns that are published. If no column list is specified, then all columns
onthe publisher[, present and future,] are replicated. See CREATE PUBLICATION for details on the syntax. 
>
> ...security...
>
> ...delete the entire "ambiguous" paragraph...
>

The "ambiguous" paragraph was trying to make the point that although
(a) having no column-list at all and
(b) having a column list that names every table column

starts off looking and working the same, don't be tricked into
thinking they are exactly equivalent, because if the table ever gets
ALTERED later then the behaviour of those PUBLICATIONs begins to
differ.

~

Your suggested text doesn't seem quite as explicit about that subtle
point, but I guess since you can still infer the same meaning it is
fine.

But, maybe say "all columns on the published table" instead of "all
columns on the publisher".

======
Kind Regards,
Peter Smith.
Fujitsu Australia



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Ambiguous description on new columns
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Ambiguous description on new columns