Re: row filtering for logical replication
От | Amit Kapila |
---|---|
Тема | Re: row filtering for logical replication |
Дата | |
Msg-id | CAA4eK1L6hLRxFVphDO8mwuguc9kVdMu-DT2Dw2GXHwvprLoxrw@mail.gmail.com обсуждение исходный текст |
Ответ на | RE: row filtering for logical replication ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>) |
Список | pgsql-hackers |
On Tue, Feb 1, 2022 at 9:15 AM houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com> wrote: > > On Monday, January 31, 2022 9:02 PM Amit Kapila <amit.kapila16@gmail.com> > > > > > 3. > > + /* row filter (if any) */ > > + if (pset.sversion >= 150000) > > + { > > + if (!PQgetisnull(result, i, 1)) > > + appendPQExpBuffer(&buf, " WHERE %s", PQgetvalue(result, i, 1)); } > > > > I don't think we need this version check if while forming query we use NULL as > > the second column in the corresponding query for v < 150000. > > Changed. > But, I don't see a corresponding change in the else part of the query: else { printfPQExpBuffer(&buf, "SELECT pubname\n" "FROM pg_catalog.pg_publication p\n" "JOIN pg_catalog.pg_publication_rel pr ON p.oid = pr.prpubid\n" "WHERE pr.prrelid = '%s'\n" "UNION ALL\n" "SELECT pubname\n" "FROM pg_catalog.pg_publication p\n" "WHERE p.puballtables AND pg_catalog.pg_relation_is_publishable('%s')\n" "ORDER BY 1;", oid, oid); } Don't we need to do that to keep it working with previous versions? -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: