From: | Fabrízio de Royes Mello <fabrizio(at)timbira(dot)com(dot)br> |
---|---|
To: | PALAYRET Jacques <jacques(dot)palayret(at)meteo(dot)fr> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Conditional column filtering with pglogical replication |
Date: | 2020-10-23 14:23:19 |
Message-ID: | CAPfkCSDB96zHHGqDkMDSnOofj3eHsvrv05xf-L4tMK1vqzy=LA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Em sex., 23 de out. de 2020 às 10:35, PALAYRET Jacques <
jacques(dot)palayret(at)meteo(dot)fr> escreveu:
>
> With PgLogical extension, I have tested the possibility of column
filtering (columns) and row filtering (row_filter).
> But is there a way to do a conditional column filtering ?
> I mean a way to filter a column based on a predicate, with pglogical (so
the filtered values won’t arrive on subscribers).
> For example, with a replicated table t(a integer as Primary Key, b
numeric, c integer, d text), I would like to filter the column b when c
between 10 and 20.
>
Hello,
According to the documentation [1] the row_filter is a normal PostgreSQL
expression with the same limitations of CHECK constraints, so you can do
something like: row_filter := 'c between 10 and 20 and b = ?'
Regards,
[1] https://github.com/2ndQuadrant/pglogical#row-filtering
--
Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Semanchuk | 2020-10-23 14:53:07 | Re: postgres materialized view refresh performance |
Previous Message | Ravi Krishna | 2020-10-23 13:52:01 | Re: postgres materialized view refresh performance |