Re: pgsql: Apply RLS policies to partitioned tables.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Apply RLS policies to partitioned tables.
Date: 2017-06-12 13:46:04
Message-ID: 7444.1497275164@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> writes:
> How about something like the attached? The patch makes
> mtstate->mt_plans[0] to be passed for all invocations of ExecInitQual() on
> WithCheckOption.qual that is being initialized for each partition.

Well, the question then is whether that behaves correctly. Where it would
matter is if the WCO qual contains a SubPlan, because you'd be adding
multiple instances of the subplan to the PlanState's list. I think it's
probably all right, but it might be wise to add a test case where there
is such a subplan.

Spacing and comment wording seem a bit random in this, too.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-06-12 13:52:10 pgsql: Trim trailing whitespace
Previous Message Peter Eisentraut 2017-06-12 12:55:41 pgsql: Stop table sync workers when subscription relation entry is remo