Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNE5d-0005eZ-3d for pgsql-general@arkaria.postgresql.org; Mon, 06 Sep 2021 12:51:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mNE5c-0007Rz-3z for pgsql-general@arkaria.postgresql.org; Mon, 06 Sep 2021 12:51:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNE5b-0007Rr-R0 for pgsql-general@lists.postgresql.org; Mon, 06 Sep 2021 12:51:07 +0000 Received: from smtp-zimbra.meteo.fr ([137.129.16.22] helo=celebrian1.meteo.fr) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNE5X-0001Yy-0K for pgsql-general@postgresql.org; Mon, 06 Sep 2021 12:51:06 +0000 Received: from localhost (localhost [127.0.0.1]) by celebrian1.meteo.fr (Postfix) with ESMTP id 12EF91C24E5 for ; Mon, 6 Sep 2021 14:50:57 +0200 (CEST) Received: from celebrian1.meteo.fr ([127.0.0.1]) by localhost (celebrian1.meteo.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dv4X-SJzUM55 for ; Mon, 6 Sep 2021 14:50:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by celebrian1.meteo.fr (Postfix) with ESMTP id EAD761C24E4 for ; Mon, 6 Sep 2021 14:50:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at celebrian1.meteo.fr Received: from celebrian1.meteo.fr ([127.0.0.1]) by localhost (celebrian1.meteo.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LzzPFKpN3OLO for ; Mon, 6 Sep 2021 14:50:56 +0200 (CEST) Received: from zumba5.meteo.fr (zumba5 [172.31.9.201]) by celebrian1.meteo.fr (Postfix) with ESMTP id D17321C24E1 for ; Mon, 6 Sep 2021 14:50:56 +0200 (CEST) Date: Mon, 6 Sep 2021 14:50:55 +0200 (CEST) From: PALAYRET Jacques To: pgsql-general@postgresql.org Message-ID: <721432453.13505154.1630932655839.JavaMail.zimbra@meteo.fr> Subject: PostgreSQL : column value filtering in Logical Replication MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_0b945287-e216-49f7-aeb9-439a1ebc3169" X-Originating-IP: [172.31.9.204] X-Mailer: Zimbra 8.7.11_GA_3822 (ZimbraWebClient - FF78 (Win)/8.7.11_GA_3822) Thread-Index: UTWCwEwNwN+pHJT4O7TgUZBLjI8CdQ== Thread-Topic: PostgreSQL : column value filtering in Logical Replication List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_0b945287-e216-49f7-aeb9-439a1ebc3169 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello,=20 Would it be possible to have a " Column value filtering in Logical Replicat= ion ", on the publication side ?=20 Il would not be a " Column Filtering " neither a " row filtering ". It woul= d be the possibility to send NULL (instead of the column value, for a publi= cation table), when a where clause is unsatisfied.=20 In others terms, a way to filter column values according to a logical condi= tion.=20 CREATE PUBLICATION [ FOR TABLE [ONLY] table_name [(colname [,=E2= =80=A6]) [WHERE ()] ]=20 would become :=20 CREATE PUBLICATION [ FOR TABLE [ONLY] table_name [(colname [WHER= E ()] [,=E2=80=A6]) [WHERE ()] ]=20 -> The " col_where_clause " could be a where clause to filter or better a f= unction to transform the column values.=20 For example, with a col_where_clause (for column b) as : " b <=3D 50 "=20 On publisher :=20 a | b=20 -----+------=20 111 | 44.4=20 222 | 55.5=20 333 | 33.3=20 on subscriber :=20 a | b=20 -----+------=20 111 | 44.4=20 222 |=20 333 | 33.3=20 Regards=20 ----- M=C3=A9t=C3=A9o-France -----=20 PALAYRET JACQUES=20 DCSC/MBD=20 jacques.palayret@meteo.fr=20 Fixe : +33 561078319=20 --=_0b945287-e216-49f7-aeb9-439a1ebc3169 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hello,

Would it be possible to h= ave a " Column value filtering in Logical Replication ", on the publication= side ?
Il would not be a " Column Filtering " neither a " row filtering= ". It would be the possibility to send NULL (instead of the column value, = for a publication table), when a where clause is unsatisfied.
In others = terms, a way to filter column values according to a logical condition.
<= br>CREATE PUBLICATION <pub_name> [ FOR TABLE [ONLY] table_name [(coln= ame [,=E2=80=A6])  [WHERE (<where_clause>)] ]
would become :<= br>CREATE PUBLICATION <pub_name> [ FOR TABLE [ONLY] table_name [(coln= ame [WHERE (<col_where_clause>)] [,=E2=80=A6])  [WHERE (<row_= where_clause>)] ]
-> The " col_where_clause " could be a where cla= use to filter or better a function to transform the column values.

<= br>For example, with a col_where_clause (for column b) as : " b <=3D 50 = "

On publisher :
a | b
-----+------
111 | 44.4
222 | 5= 5.5
333 | 33.3

on subscriber :
a | b
-----+------
111= | 44.4
222 |
333 | 33.3


Regards
----- M=C3=A9t=C3=A9o-France -----
PALAYRET JACQUES<= br>DCSC/MBD
jacques.palayret@meteo.fr
Fixe : +33 561078319
--=_0b945287-e216-49f7-aeb9-439a1ebc3169--