aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2015-04-17 16:37:11 -0400
committerStephen Frost <sfrost@snowman.net>2015-04-17 16:37:11 -0400
commitab6d1cd26ebfbfce275cd31af82814c0620e70a2 (patch)
tree9d371a552e4ceb2223053bbe98e46c183173735b /src
parent4cb7d671fddc8855c8def2de51fb23df1c8ac0af (diff)
downloadpostgresql-ab6d1cd26ebfbfce275cd31af82814c0620e70a2.tar.gz
postgresql-ab6d1cd26ebfbfce275cd31af82814c0620e70a2.zip
Fix typo in relcache's equalPolicy()
The USING policies were not being checked for differences as the same policy was being passed in to both sides of the equal(). This could result in backends not realizing that a policy had been changed, if none of the other attributes had been changed. Fix by passing to equal() the policy1 and policy2 using quals for comparison. No need to back-patch as this is not yet released. Noticed while testing changes to RLS proposed by Dean Rasheed.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/cache/relcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 4ea01d1ad63..e745006b73b 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -887,7 +887,7 @@ equalPolicy(RowSecurityPolicy *policy1, RowSecurityPolicy *policy2)
return false;
}
- if (!equal(policy1->qual, policy1->qual))
+ if (!equal(policy1->qual, policy2->qual))
return false;
if (!equal(policy1->with_check_qual, policy2->with_check_qual))
return false;