RE: Column Filtering in Logical Replication
От | houzj.fnst@fujitsu.com |
---|---|
Тема | RE: Column Filtering in Logical Replication |
Дата | |
Msg-id | OS0PR01MB57166C0E07D626BA8F9E846F94DD9@OS0PR01MB5716.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Column Filtering in Logical Replication (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Список | pgsql-hackers |
On Thurs, Sep 16, 2021 10:37 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > On 2021-Sep-16, Alvaro Herrera wrote: > > Actually, something like this might be better: > > > PublicationObjSpec: > > > | TABLE qualified_name > > { > > $$ = makeNode(PublicationObjSpec); > > $$->pubobjtype = PUBLICATIONOBJ_TABLE; > > $$->pubrvobj = $2; > > $$->location = @1; > > } > > | ALL TABLES IN_P SCHEMA name > > { > > $$ = makeNode(PublicationObjSpec); > > $$->pubobjtype = PUBLICATIONOBJ_ALL_TABLES_IN_SCHEMA; > > $$->pubplainobj = $5; > > $$->location = @1; > > } > So you don't have to cram the schema name in a RangeVar, which would indeed > be quite awkward. (I'm sure you can come up with better names for the struct > members there ...)> Did you mean something like the following ? ----- PublicationObjSpec: TABLE qualified_name {...} | ALL TABLES IN_P SCHEMA name {...} ; pub_obj_list: PublicationObjSpec | pub_obj_list ',' PublicationObjSpec ----- If so, I think it only supports syntaxes like "TABLE a, TABLE b, TABLE c" while we cannnot use "TABLE a,b,c". To support multiple objects, we need a bare name in PublicationObjSpec. Or Did you mean something like this ? ----- PublicationObjSpec: TABLE qualified_name {...} | ALL TABLES IN_P SCHEMA name {...} | qualified_name {...} ; ----- I think this doesn't support relation expression like "table */ONLY table/ONLY (table)" as memtioned by Vignesh [1]. Thoughts ? [1] https://www.postgresql.org/message-id/CALDaNm06%3DLDytYyY%2BxcAQd8UK_YpJ3zMo4P5V8KBArw6MoDWDg%40mail.gmail.com Best regards, Hou zj
В списке pgsql-hackers по дате отправления: