Обсуждение: PostgreSQL : column value filtering in Logical Replication

Поиск
Список
Период
Сортировка

PostgreSQL : column value filtering in Logical Replication

От
PALAYRET Jacques
Дата:
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