Skip to content

Commit ab6d1cd

Browse files
committed
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.
1 parent 4cb7d67 commit ab6d1cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ equalPolicy(RowSecurityPolicy *policy1, RowSecurityPolicy *policy2)
887887
return false;
888888
}
889889

890-
if (!equal(policy1->qual, policy1->qual))
890+
if (!equal(policy1->qual, policy2->qual))
891891
return false;
892892
if (!equal(policy1->with_check_qual, policy2->with_check_qual))
893893
return false;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy