pgsql: Fix Var handling for security barrier views

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix Var handling for security barrier views
Date: 2014-08-27 03:38:03
Message-ID: E1XMU3f-0004h2-4i@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix Var handling for security barrier views

In some cases, not all Vars were being correctly marked as having been
modified for updatable security barrier views, which resulted in invalid
plans (eg: when security barrier views were created over top of
inheiritance structures).

In passing, be sure to update both varattno and varonattno, as _equalVar
won't consider the Vars identical otherwise. This isn't known to cause
any issues with updatable security barrier views, but was noticed as
missing while working on RLS and makes sense to get fixed.

Back-patch to 9.4 where updatable security barrier views were
introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e414ba93add966dfe03e22994764e718ed89ee98

Modified Files
--------------
src/backend/optimizer/prep/prepsecurity.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2014-08-27 10:51:20 pgsql: Add header comments to receivelog.h and streamutil.h.
Previous Message Peter Eisentraut 2014-08-27 02:47:48 pgsql: doc: Document valid checkpoint_timeout range