From: | PALAYRET Jacques <jacques(dot)palayret(at)meteo(dot)fr> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | PostgreSQL : column value filtering in Logical Replication |
Date: | 2021-09-06 12:50:55 |
Message-ID: | 721432453.13505154.1630932655839.JavaMail.zimbra@meteo.fr |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)palayret(at)meteo(dot)fr
Fixe : +33 561078319
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-09-06 13:38:27 | Re: pg_upgrade - fe_sendauth: no password supplied |
Previous Message | Philippe Doussot | 2021-09-06 09:32:55 | Re: update non-indexed value is slow if some non-related index/fk are enabled |