PostgreSQL : column value filtering in Logical Replication - Mailing list pgsql-general

From PALAYRET Jacques
Subject PostgreSQL : column value filtering in Logical Replication
Date
Msg-id 721432453.13505154.1630932655839.JavaMail.zimbra@meteo.fr
Whole thread Raw
List pgsql-general
Hello,

Would it be possible to have 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.

CREATE PUBLICATION <pub_name> [ FOR TABLE [ONLY] table_name [(colname [,…])  [WHERE (<where_clause>)] ]
would become :
CREATE PUBLICATION <pub_name> [ FOR TABLE [ONLY] table_name [(colname [WHERE (<col_where_clause>)] [,…])  [WHERE (<row_where_clause>)] ]
-> The " col_where_clause " could be a where clause to filter or better a function to transform the column values.


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

On publisher :
a | b
-----+------
111 | 44.4
222 | 55.5
333 | 33.3

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


Regards
----- Météo-France -----
PALAYRET JACQUES
DCSC/MBD
jacques.palayret@meteo.fr
Fixe : +33 561078319

pgsql-general by date:

Previous
From: Philippe Doussot
Date:
Subject: Re: update non-indexed value is slow if some non-related index/fk are enabled
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade - fe_sendauth: no password supplied