]> granicus.if.org Git - postgresql/commit
Fix Var handling for security barrier views
authorStephen Frost <sfrost@snowman.net>
Wed, 27 Aug 2014 03:08:41 +0000 (23:08 -0400)
committerStephen Frost <sfrost@snowman.net>
Wed, 27 Aug 2014 03:37:50 +0000 (23:37 -0400)
commitd4b8418a04f41dc991dc364a0a6eab64b16f2e83
tree3b05080c441931e877f2f9c7ad148519facdff6b
parent06414c0f68e9f8039c1de40d009f12fa96c49192
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.
src/backend/optimizer/prep/prepsecurity.c