summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/rowsecurity.out
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2015-07-11 14:19:31 -0700
committerJoe Conway <mail@joeconway.com>2015-07-11 14:19:31 -0700
commit808ea8fc7bb259ddd810353719cac66e85a608c8 (patch)
treef665df0ac4a9e9cdacfbfccefbf5f7d7354c93e8 /src/test/regress/expected/rowsecurity.out
parentcba045b0bd25285242936fd678bc443bfd0d5b83 (diff)
downloadpostgresql-808ea8fc7bb259ddd810353719cac66e85a608c8.tar.gz
Add assign_expr_collations() to CreatePolicy() and AlterPolicy().
As noted by Noah Misch, CreatePolicy() and AlterPolicy() omit to call assign_expr_collations() on the node trees. Fix the omission and add his test case to the rowsecurity regression test.
Diffstat (limited to 'src/test/regress/expected/rowsecurity.out')
-rw-r--r--src/test/regress/expected/rowsecurity.out21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/regress/expected/rowsecurity.out b/src/test/regress/expected/rowsecurity.out
index 4073c1beea..eabfd932de 100644
--- a/src/test/regress/expected/rowsecurity.out
+++ b/src/test/regress/expected/rowsecurity.out
@@ -2730,6 +2730,27 @@ ERROR: permission denied for relation copy_t
RESET SESSION AUTHORIZATION;
DROP TABLE copy_t;
--
+-- Collation support
+--
+BEGIN;
+SET row_security = force;
+CREATE TABLE coll_t (c) AS VALUES ('bar'::text);
+CREATE POLICY coll_p ON coll_t USING (c < ('foo'::text COLLATE "C"));
+ALTER TABLE coll_t ENABLE ROW LEVEL SECURITY;
+SELECT (string_to_array(polqual, ':'))[7] AS inputcollid FROM pg_policy WHERE polrelid = 'coll_t'::regclass;
+ inputcollid
+------------------
+ inputcollid 950
+(1 row)
+
+SELECT * FROM coll_t;
+ c
+-----
+ bar
+(1 row)
+
+ROLLBACK;
+--
-- Clean up objects
--
RESET SESSION AUTHORIZATION;