preprocess_targetlist and inheiritance
Tom, all,
Looks like preprocess_targetlist() should have been adjusted with the
changes to ExecBuildAuxRowMark() to support foreign tables being part
of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to
also include the tableoid regardless of the rowMark type, if the
relation is the parent of an inheritance tree.
This was noted by Dean Rasheed while working on RLS since it was
causing one of the new RLS-with-inheritance regression tests to fail
with: ERROR: could not find junk tableoid1 column
This does change the output a bit in the regression tests due to the
change in ordering of the columns displayed by explain.
Patch attached for your review.
Thoughts?
I'm happy to push this if no one has any issues with it, but also
won't object if you'd prefer to.
Thanks!
Stephen
Attachments:
preprocess_targetlist_inheritance.patchtext/x-diff; charset=us-asciiDownload+43-44
Stephen Frost wrote:
Tom, all,
Looks like preprocess_targetlist() should have been adjusted with the
changes to ExecBuildAuxRowMark() to support foreign tables being part
of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to
also include the tableoid regardless of the rowMark type, if the
relation is the parent of an inheritance tree.
Uh, this patch was already submitted separately:
/messages/by-id/552CF0B6.8010006@lab.ntt.co.jp
--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Alvaro,
On Tuesday, April 21, 2015, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Stephen Frost wrote:
Tom, all,
Looks like preprocess_targetlist() should have been adjusted with the
changes to ExecBuildAuxRowMark() to support foreign tables being part
of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to
also include the tableoid regardless of the rowMark type, if the
relation is the parent of an inheritance tree.Uh, this patch was already submitted separately:
/messages/by-id/552CF0B6.8010006@lab.ntt.co.jp
Oh, excellent. Looks like the discussion agrees that it makes sense to do
and the RLS case didn't involve any foreign tables yet still ran into the
issue.
Is that correct or am I missing something?
Apologies, on my mobile currently.
Thanks!
Stephen
On 2015/04/22 0:43, Stephen Frost wrote:
On Tuesday, April 21, 2015, Alvaro Herrera <alvherre@2ndquadrant.com
<mailto:alvherre@2ndquadrant.com>> wrote:
Stephen Frost wrote:
Tom, all,
Looks like preprocess_targetlist() should have been adjusted
with the
changes to ExecBuildAuxRowMark() to support foreign tables
being part
of inheritance trees (cb1ca4d800621dcae67ca6c799006de99fa4f0a5) to
also include the tableoid regardless of the rowMark type, if the
relation is the parent of an inheritance tree.Uh, this patch was already submitted separately:
/messages/by-id/552CF0B6.8010006@lab.ntt.co.jp
Oh, excellent. Looks like the discussion agrees that it makes sense to
do and the RLS case didn't involve any foreign tables yet still ran into
the issue.
IIUC, I think the issue would be raised when performing SELECT FOR
UPDATE/SHARE on an inheritance set the parents and childs of which are
all foreign tables, or when performing UPDATE/DELETE involving such an
inheritance set as a source table. Probably, I think your new
RLS-with-inheritance regression tests include such a query.
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers