On Mon, Jan 31, 2022 at 1:08 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Mon, Jan 31, 2022 at 7:27 AM houzj.f...@fujitsu.com > <houzj.f...@fujitsu.com> wrote: > > > > On Monday, January 31, 2022 8:53 AM Peter Smith <smithpb2...@gmail.com> > > wrote: > > > > > > PSA v73*. > > > > > > (A rebase was needed due to recent changes in tab-complete.c. > > > Otherwise, v73* is the same as v72*). > > > > Thanks for the rebase. > > Attach the V74 patch set which did the following changes: > > > > Few comments: > ============= >
Few more minor comments: 1. + if (relentry->attrmap) + { + TupleDesc tupdesc = RelationGetDescr(relation); + TupleTableSlot *tmp_slot = MakeTupleTableSlot(tupdesc, + &TTSOpsVirtual); + + new_slot = execute_attr_map_slot(relentry->attrmap, + new_slot, + tmp_slot); I think we don't need these additional variables tupdesc and tmp_slot. You can directly use MakeTupleTableSlot instead of tmp_slot, which will make this and nearby code look better. 2. + if (pubrinfo->pubrelqual) + appendPQExpBuffer(query, " WHERE (%s)", pubrinfo->pubrelqual); + appendPQExpBufferStr(query, ";\n"); Do we really need additional '()' for rwo filter expression here? See the below output from pg_dump: ALTER PUBLICATION pub1 ADD TABLE ONLY public.t1 WHERE ((c1 < 100)); 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. -- With Regards, Amit Kapila.