On Thu, Jun 3, 2021 at 10:07 AM Amit Langote <amitlangot...@gmail.com> wrote: > On Thu, Jun 3, 2021 at 3:39 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > > > > Amit Langote <amitlangot...@gmail.com> writes: > > > I noticed that 428b260f87e8 (v12) broke the cases where a parent > > > foreign table has row marks assigned. > > > > Indeed :-(. Fix pushed. I tweaked the comments and test case slightly. > > Thank you.
Ah, I had forgotten to propose that we replace the following in the preprocess_targetlist()'s row marks loop: /* child rels use the same junk attrs as their parents */ if (rc->rti != rc->prti) continue; by an Assert as follows: + /* No child row marks yet. */ + Assert (rc->rti == rc->prti); I think the only place that sets prti that is != rti of a row mark is expand_single_inheritance_child() and we can be sure that that function now always runs after preprocess_targetlist() has run. Attached a patch. Thoughts? -- Amit Langote EDB: http://www.enterprisedb.com
no-child-rowmarks.patch
Description: Binary data