RE: row filtering for logical replication

Поиск
Список
Период
Сортировка
От houzj.fnst@fujitsu.com
Тема RE: row filtering for logical replication
Дата
Msg-id OS3PR01MB5718313C96308D64CFCB08E2942C9@OS3PR01MB5718.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: row filtering for logical replication  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: row filtering for logical replication  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Sat, Feb 5, 2022 7:51 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> 
> On Fri, Feb 4, 2022 at 2:58 PM houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com>
> wrote:
> >
> > On Thursday, February 3, 2022 11:11 PM houzj.fnst@fujitsu.com
> > <houzj.fnst@fujitsu.com>
> >
> > Since the v76-0000-clean-up-pgoutput-cache-invalidation.patch has been
> > committed, attach a new version patch set to make the cfbot happy.
> > Also addressed the above comments related to tab-complete in 0002 patch.
> >
> 
> I don't like some of the error message changes in this new version. For example:
> 
> v75:
> +CREATE FUNCTION testpub_rf_func1(integer, integer) RETURNS boolean AS
> $$ SELECT hashint4($1) > $2 $$ LANGUAGE SQL;
> +CREATE OPERATOR =#> (PROCEDURE = testpub_rf_func1, LEFTARG = integer,
> RIGHTARG = integer);
> +CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> +ERROR:  invalid publication WHERE expression for relation "testpub_rf_tbl3"
> +DETAIL:  User-defined operators are not allowed.
> 
> v77
> +CREATE FUNCTION testpub_rf_func1(integer, integer) RETURNS boolean AS
> $$ SELECT hashint4($1) > $2 $$ LANGUAGE SQL;
> +CREATE OPERATOR =#> (PROCEDURE = testpub_rf_func1, LEFTARG = integer,
> RIGHTARG = integer);
> +CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> +ERROR:  invalid publication WHERE expression LINE 1: ...ICATION
> +testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> +                                                             ^
> +DETAIL:  User-defined or mutable functions are not allowed
> 
> I think the detailed message by v75 "DETAIL:  User-defined operators are not
> allowed." will be easier for users to understand. I have made some code changes
> and refactoring to make this behavior like previous without removing the
> additional checks you have added in v77. I have made a few changes to
> comments and error messages. Attached is a top-up patch on your v77 patch
> series. I suggest we can combine the
> 0001 and 0002 patches as well.

Thanks for the comments.
Your changes look good to me.

Attach the V78 patch which addressed the above changes and merged 0001 and
0002.

Best regards,
Hou zj



Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pg_walfile_name uses XLByteToPrevSeg
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message