diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/create_property_graph.out C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/create_property_graph.out --- C:/cirrus/src/test/regress/expected/create_property_graph.out 2026-03-19 20:56:30.312647100 +0000 +++ C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/create_property_graph.out 2026-03-19 21:02:58.952830200 +0000 @@ -57,13 +57,16 @@ ALTER PROPERTY GRAPH g3 ALTER VERTEX TABLE t3 DROP LABEL t3l3x; -- error ERROR: property graph "g3" element "t3" has no label "t3l3x" ALTER PROPERTY GRAPH g3 ALTER VERTEX TABLE t3 DROP LABEL t3l3; +ERROR: unsupported object class: 8318 ALTER PROPERTY GRAPH g3 DROP VERTEX TABLES (t2); -- fail ERROR: cannot drop vertex t2 of property graph g3 because other objects depend on it DETAIL: edge e1 of property graph g3 depends on vertex t2 of property graph g3 HINT: Use DROP ... CASCADE to drop the dependent objects too. ALTER PROPERTY GRAPH g3 DROP VERTEX TABLES (t2) CASCADE; NOTICE: drop cascades to edge e1 of property graph g3 +ERROR: unsupported object class: 8318 ALTER PROPERTY GRAPH g3 DROP EDGE TABLES (e2); +ERROR: unsupported object class: 8318 CREATE PROPERTY GRAPH g4 VERTEX TABLES ( t1 KEY (a) NO PROPERTIES, @@ -82,6 +85,7 @@ ); ALTER PROPERTY GRAPH g4 ALTER VERTEX TABLE t2 ALTER LABEL t2 ADD PROPERTIES (k * 2 AS kk); ALTER PROPERTY GRAPH g4 ALTER VERTEX TABLE t2 ALTER LABEL t2 DROP PROPERTIES (k); +ERROR: unsupported object class: 8318 CREATE TABLE t11 (a int PRIMARY KEY); CREATE TABLE t12 (b int PRIMARY KEY); CREATE TABLE t13 ( @@ -192,25 +196,30 @@ t2x KEY (i) PROPERTIES (j::varchar(20) AS p1) -- matching typmods by casting works ); DROP PROPERTY GRAPH gx; +ERROR: unsupported object class: 8318 DROP TABLE t1x, t2x; +ERROR: cannot drop desired object(s) because other objects depend on them +DETAIL: vertex t2x of property graph gx depends on table t2x +vertex t1x of property graph gx depends on table t1x +HINT: Use DROP ... CASCADE to drop the dependent objects too. CREATE PROPERTY GRAPH gx VERTEX TABLES ( t1 KEY (a) LABEL l1 PROPERTIES (a, a AS aa), t2 KEY (i) LABEL l1 PROPERTIES (i AS a, j AS b, k) -- mismatching number of properties on label ); -ERROR: mismatching number of properties in definition of label "l1" +ERROR: relation "gx" already exists CREATE PROPERTY GRAPH gx VERTEX TABLES ( t1 KEY (a) LABEL l1 PROPERTIES (a, b), t2 KEY (i) LABEL l1 PROPERTIES (i AS a) -- mismatching number of properties on label ); -ERROR: mismatching number of properties in definition of label "l1" +ERROR: relation "gx" already exists CREATE PROPERTY GRAPH gx VERTEX TABLES ( t1 KEY (a) LABEL l1 PROPERTIES (a, b), t2 KEY (i) LABEL l1 PROPERTIES (i AS a, j AS j) -- mismatching property names on label ); -ERROR: mismatching properties names in definition of label "l1" +ERROR: relation "gx" already exists ALTER PROPERTY GRAPH g4 ALTER VERTEX TABLE t1 ADD LABEL t3l1 PROPERTIES (a AS x, b AS yy, b AS zz); -- mismatching number of properties on label ERROR: mismatching number of properties in definition of label "t3l1" ALTER PROPERTY GRAPH g4 ALTER VERTEX TABLE t1 ADD LABEL t3l1 PROPERTIES (a AS x, b AS zz); -- mismatching property names on label @@ -220,6 +229,8 @@ ALTER PROPERTY GRAPH g1 OWNER TO regress_graph_user1; SET ROLE regress_graph_user1; GRANT SELECT ON PROPERTY GRAPH g1 TO regress_graph_user2; +ERROR: unsupported object type: 30 +CONTEXT: PL/pgSQL function regress_ddl_roundtrip_trigger_func() line 13 at FOR over SELECT rows GRANT UPDATE ON PROPERTY GRAPH g1 TO regress_graph_user2; -- fail ERROR: invalid privilege type UPDATE for property graph RESET ROLE; @@ -285,6 +296,7 @@ DEFAULT LABEL PROPERTIES (ek1, ek2, eb COLLATE pg_catalog.DEFAULT AS eb) ); DROP PROPERTY GRAPH gc1; +ERROR: unsupported object class: 8318 CREATE PROPERTY GRAPH gc1 VERTEX TABLES ( tc1 KEY (a) DEFAULT LABEL PROPERTIES (a, b::varchar COLLATE "C" AS b), @@ -301,6 +313,7 @@ DESTINATION KEY (ek2) REFERENCES tc2 (a) DEFAULT LABEL PROPERTIES (ek1, ek2, eb COLLATE pg_catalog.DEFAULT AS eb) ); +ERROR: relation "gc1" already exists -- type inconsistency check CREATE TABLE v1 (a int primary key, b text); CREATE TABLE e(k1 text, k2 text, c text); @@ -334,7 +347,8 @@ regression | create_property_graph_tests | g5 regression | create_property_graph_tests | gc1 regression | create_property_graph_tests | gt -(7 rows) + regression | create_property_graph_tests | gx +(8 rows) SELECT * FROM information_schema.pg_element_tables ORDER BY property_graph_name, element_table_alias; property_graph_catalog | property_graph_schema | property_graph_name | element_table_alias | element_table_kind | table_catalog | table_schema | table_name | element_table_definition @@ -344,7 +358,10 @@ regression | create_property_graph_tests | g2 | t1 | VERTEX | regression | create_property_graph_tests | t1 | regression | create_property_graph_tests | g2 | t2 | VERTEX | regression | create_property_graph_tests | t2 | regression | create_property_graph_tests | g2 | t3 | VERTEX | regression | create_property_graph_tests | t3 | + regression | create_property_graph_tests | g3 | e1 | EDGE | regression | create_property_graph_tests | e1 | + regression | create_property_graph_tests | g3 | e2 | EDGE | regression | create_property_graph_tests | e2 | regression | create_property_graph_tests | g3 | t1 | VERTEX | regression | create_property_graph_tests | t1 | + regression | create_property_graph_tests | g3 | t2 | VERTEX | regression | create_property_graph_tests | t2 | regression | create_property_graph_tests | g3 | t3 | VERTEX | regression | create_property_graph_tests | t3 | regression | create_property_graph_tests | g4 | e1 | EDGE | regression | create_property_graph_tests | e1 | regression | create_property_graph_tests | g4 | e2 | EDGE | regression | create_property_graph_tests | e2 | @@ -362,7 +379,9 @@ regression | create_property_graph_tests | gt | e | EDGE | regression | create_property_graph_tests | e | regression | create_property_graph_tests | gt | v1 | VERTEX | regression | create_property_graph_tests | v1 | regression | create_property_graph_tests | gt | v2 | VERTEX | regression | create_property_graph_tests | v2 | -(23 rows) + regression | create_property_graph_tests | gx | t1x | VERTEX | regression | create_property_graph_tests | t1x | + regression | create_property_graph_tests | gx | t2x | VERTEX | regression | create_property_graph_tests | t2x | +(28 rows) SELECT * FROM information_schema.pg_element_table_key_columns ORDER BY property_graph_name, element_table_alias, ordinal_position; property_graph_catalog | property_graph_schema | property_graph_name | element_table_alias | column_name | ordinal_position @@ -374,7 +393,12 @@ regression | create_property_graph_tests | g2 | t1 | a | 1 regression | create_property_graph_tests | g2 | t2 | i | 1 regression | create_property_graph_tests | g2 | t3 | x | 1 + regression | create_property_graph_tests | g3 | e1 | a | 1 + regression | create_property_graph_tests | g3 | e1 | i | 2 + regression | create_property_graph_tests | g3 | e2 | a | 1 + regression | create_property_graph_tests | g3 | e2 | x | 2 regression | create_property_graph_tests | g3 | t1 | a | 1 + regression | create_property_graph_tests | g3 | t2 | i | 1 regression | create_property_graph_tests | g3 | t3 | x | 1 regression | create_property_graph_tests | g4 | e1 | a | 1 regression | create_property_graph_tests | g4 | e1 | i | 2 @@ -397,7 +421,9 @@ regression | create_property_graph_tests | gt | e | k2 | 2 regression | create_property_graph_tests | gt | v1 | a | 1 regression | create_property_graph_tests | gt | v2 | m | 1 -(30 rows) + regression | create_property_graph_tests | gx | t1x | a | 1 + regression | create_property_graph_tests | gx | t2x | i | 1 +(37 rows) SELECT * FROM information_schema.pg_edge_table_components ORDER BY property_graph_name, edge_table_alias, edge_end DESC, ordinal_position; property_graph_catalog | property_graph_schema | property_graph_name | edge_table_alias | vertex_table_alias | edge_end | edge_table_column_name | vertex_table_column_name | ordinal_position @@ -407,6 +433,11 @@ regression | create_property_graph_tests | g2 | e2 | t1 | SOURCE | a | a | 1 regression | create_property_graph_tests | g2 | e2 | t3 | DESTINATION | x | x | 1 regression | create_property_graph_tests | g2 | e2 | t3 | DESTINATION | t | y | 2 + regression | create_property_graph_tests | g3 | e1 | t1 | SOURCE | a | a | 1 + regression | create_property_graph_tests | g3 | e1 | t2 | DESTINATION | i | i | 1 + regression | create_property_graph_tests | g3 | e2 | t1 | SOURCE | a | a | 1 + regression | create_property_graph_tests | g3 | e2 | t3 | DESTINATION | x | x | 1 + regression | create_property_graph_tests | g3 | e2 | t3 | DESTINATION | t | y | 2 regression | create_property_graph_tests | g4 | e1 | t1 | SOURCE | a | a | 1 regression | create_property_graph_tests | g4 | e1 | t2 | DESTINATION | i | i | 1 regression | create_property_graph_tests | g4 | e2 | t1 | SOURCE | a | a | 1 @@ -420,7 +451,7 @@ regression | create_property_graph_tests | gc1 | ec2 | tc2 | DESTINATION | ek2 | a | 1 regression | create_property_graph_tests | gt | e | v1 | SOURCE | k1 | a | 1 regression | create_property_graph_tests | gt | e | v2 | DESTINATION | k2 | m | 1 -(18 rows) +(23 rows) SELECT * FROM information_schema.pg_element_table_labels ORDER BY property_graph_name, element_table_alias, label_name; property_graph_catalog | property_graph_schema | property_graph_name | element_table_alias | label_name @@ -431,9 +462,13 @@ regression | create_property_graph_tests | g2 | t2 | t2 regression | create_property_graph_tests | g2 | t3 | t3l1 regression | create_property_graph_tests | g2 | t3 | t3l2 + regression | create_property_graph_tests | g3 | e1 | e1 + regression | create_property_graph_tests | g3 | e2 | e2 regression | create_property_graph_tests | g3 | t1 | t1 + regression | create_property_graph_tests | g3 | t2 | t2 regression | create_property_graph_tests | g3 | t3 | t3l1 regression | create_property_graph_tests | g3 | t3 | t3l2 + regression | create_property_graph_tests | g3 | t3 | t3l3 regression | create_property_graph_tests | g4 | e1 | e1 regression | create_property_graph_tests | g4 | e2 | e2 regression | create_property_graph_tests | g4 | t1 | t1 @@ -451,11 +486,13 @@ regression | create_property_graph_tests | gt | e | e regression | create_property_graph_tests | gt | v1 | v1 regression | create_property_graph_tests | gt | v2 | v2 -(26 rows) + regression | create_property_graph_tests | gx | t1x | t1x + regression | create_property_graph_tests | gx | t2x | t2x +(32 rows) SELECT * FROM information_schema.pg_element_table_properties ORDER BY property_graph_name, element_table_alias, property_name; - property_graph_catalog | property_graph_schema | property_graph_name | element_table_alias | property_name | property_expression -------------------------+-----------------------------+---------------------+---------------------+---------------+-------------------------------------- + property_graph_catalog | property_graph_schema | property_graph_name | element_table_alias | property_name | property_expression +------------------------+-----------------------------+---------------------+---------------------+---------------+---------------------------- regression | create_property_graph_tests | g2 | e1 | a | a regression | create_property_graph_tests | g2 | e1 | i | i regression | create_property_graph_tests | g2 | e1 | t | t @@ -470,8 +507,17 @@ regression | create_property_graph_tests | g2 | t3 | x | x regression | create_property_graph_tests | g2 | t3 | y | y regression | create_property_graph_tests | g2 | t3 | z | z + regression | create_property_graph_tests | g3 | e1 | a | a + regression | create_property_graph_tests | g3 | e1 | i | i + regression | create_property_graph_tests | g3 | e1 | t | t + regression | create_property_graph_tests | g3 | e2 | a | a + regression | create_property_graph_tests | g3 | e2 | t | t + regression | create_property_graph_tests | g3 | e2 | x | x regression | create_property_graph_tests | g3 | t1 | a | a regression | create_property_graph_tests | g3 | t1 | b | b + regression | create_property_graph_tests | g3 | t2 | i | i + regression | create_property_graph_tests | g3 | t2 | j | j + regression | create_property_graph_tests | g3 | t2 | k | k regression | create_property_graph_tests | g3 | t3 | x | x regression | create_property_graph_tests | g3 | t3 | y | y regression | create_property_graph_tests | g3 | t3 | z | z @@ -482,6 +528,7 @@ regression | create_property_graph_tests | g4 | e2 | t | t regression | create_property_graph_tests | g4 | e2 | x | x regression | create_property_graph_tests | g4 | t2 | i_j | (i + j) + regression | create_property_graph_tests | g4 | t2 | k | k regression | create_property_graph_tests | g4 | t2 | kk | (k * 2) regression | create_property_graph_tests | g4 | t3 | x | x regression | create_property_graph_tests | g4 | t3 | yy | y @@ -498,11 +545,11 @@ regression | create_property_graph_tests | gc1 | ec2 | ek1 | ek1 regression | create_property_graph_tests | gc1 | ec2 | ek2 | ek2 regression | create_property_graph_tests | gc1 | tc1 | a | a - regression | create_property_graph_tests | gc1 | tc1 | b | ((b)::character varying COLLATE "C") + regression | create_property_graph_tests | gc1 | tc1 | b | b regression | create_property_graph_tests | gc1 | tc2 | a | a - regression | create_property_graph_tests | gc1 | tc2 | b | ((b)::character varying COLLATE "C") + regression | create_property_graph_tests | gc1 | tc2 | b | b regression | create_property_graph_tests | gc1 | tc3 | a | a - regression | create_property_graph_tests | gc1 | tc3 | b | (b)::character varying + regression | create_property_graph_tests | gc1 | tc3 | b | (b COLLATE "default") regression | create_property_graph_tests | gt | e | c | c regression | create_property_graph_tests | gt | e | k1 | k1 regression | create_property_graph_tests | gt | e | k2 | k2 @@ -510,7 +557,9 @@ regression | create_property_graph_tests | gt | v1 | b | b regression | create_property_graph_tests | gt | v2 | m | m regression | create_property_graph_tests | gt | v2 | n | n -(54 rows) + regression | create_property_graph_tests | gx | t1x | p1 | (b)::character varying(20) + regression | create_property_graph_tests | gx | t2x | p1 | (j)::character varying(20) +(66 rows) SELECT * FROM information_schema.pg_label_properties ORDER BY property_graph_name, label_name, property_name; property_graph_catalog | property_graph_schema | property_graph_name | label_name | property_name @@ -532,14 +581,26 @@ regression | create_property_graph_tests | g2 | t3l2 | x regression | create_property_graph_tests | g2 | t3l2 | y regression | create_property_graph_tests | g2 | t3l2 | z + regression | create_property_graph_tests | g3 | e1 | a + regression | create_property_graph_tests | g3 | e1 | i + regression | create_property_graph_tests | g3 | e1 | t + regression | create_property_graph_tests | g3 | e2 | a + regression | create_property_graph_tests | g3 | e2 | t + regression | create_property_graph_tests | g3 | e2 | x regression | create_property_graph_tests | g3 | t1 | a regression | create_property_graph_tests | g3 | t1 | b + regression | create_property_graph_tests | g3 | t2 | i + regression | create_property_graph_tests | g3 | t2 | j + regression | create_property_graph_tests | g3 | t2 | k regression | create_property_graph_tests | g3 | t3l1 | x regression | create_property_graph_tests | g3 | t3l1 | y regression | create_property_graph_tests | g3 | t3l1 | z regression | create_property_graph_tests | g3 | t3l2 | x regression | create_property_graph_tests | g3 | t3l2 | y regression | create_property_graph_tests | g3 | t3l2 | z + regression | create_property_graph_tests | g3 | t3l3 | x + regression | create_property_graph_tests | g3 | t3l3 | y + regression | create_property_graph_tests | g3 | t3l3 | z regression | create_property_graph_tests | g4 | e1 | a regression | create_property_graph_tests | g4 | e1 | i regression | create_property_graph_tests | g4 | e1 | t @@ -547,6 +608,7 @@ regression | create_property_graph_tests | g4 | e2 | t regression | create_property_graph_tests | g4 | e2 | x regression | create_property_graph_tests | g4 | t2 | i_j + regression | create_property_graph_tests | g4 | t2 | k regression | create_property_graph_tests | g4 | t2 | kk regression | create_property_graph_tests | g4 | t3l1 | x regression | create_property_graph_tests | g4 | t3l1 | yy @@ -576,7 +638,9 @@ regression | create_property_graph_tests | gt | v1 | b regression | create_property_graph_tests | gt | v2 | m regression | create_property_graph_tests | gt | v2 | n -(61 rows) + regression | create_property_graph_tests | gx | t1x | p1 + regression | create_property_graph_tests | gx | t2x | p1 +(76 rows) SELECT * FROM information_schema.pg_labels ORDER BY property_graph_name, label_name; property_graph_catalog | property_graph_schema | property_graph_name | label_name @@ -587,9 +651,13 @@ regression | create_property_graph_tests | g2 | t2 regression | create_property_graph_tests | g2 | t3l1 regression | create_property_graph_tests | g2 | t3l2 + regression | create_property_graph_tests | g3 | e1 + regression | create_property_graph_tests | g3 | e2 regression | create_property_graph_tests | g3 | t1 + regression | create_property_graph_tests | g3 | t2 regression | create_property_graph_tests | g3 | t3l1 regression | create_property_graph_tests | g3 | t3l2 + regression | create_property_graph_tests | g3 | t3l3 regression | create_property_graph_tests | g4 | e1 regression | create_property_graph_tests | g4 | e2 regression | create_property_graph_tests | g4 | t1 @@ -607,7 +675,9 @@ regression | create_property_graph_tests | gt | e regression | create_property_graph_tests | gt | v1 regression | create_property_graph_tests | gt | v2 -(26 rows) + regression | create_property_graph_tests | gx | t1x + regression | create_property_graph_tests | gx | t2x +(32 rows) SELECT * FROM information_schema.pg_property_data_types ORDER BY property_graph_name, property_name; property_graph_catalog | property_graph_schema | property_graph_name | property_name | data_type | character_maximum_length | character_octet_length | character_set_catalog | character_set_schema | character_set_name | collation_catalog | collation_schema | collation_name | numeric_precision | numeric_precision_radix | numeric_scale | datetime_precision | interval_type | interval_precision | user_defined_type_catalog | user_defined_type_schema | user_defined_type_name | scope_catalog | scope_schema | scope_name | maximum_cardinality | dtd_identifier @@ -623,12 +693,17 @@ regression | create_property_graph_tests | g2 | z | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | z regression | create_property_graph_tests | g3 | a | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | a regression | create_property_graph_tests | g3 | b | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | b + regression | create_property_graph_tests | g3 | i | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | i + regression | create_property_graph_tests | g3 | j | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | j + regression | create_property_graph_tests | g3 | k | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | k + regression | create_property_graph_tests | g3 | t | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | t regression | create_property_graph_tests | g3 | x | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | x regression | create_property_graph_tests | g3 | y | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | y regression | create_property_graph_tests | g3 | z | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | z regression | create_property_graph_tests | g4 | a | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | a regression | create_property_graph_tests | g4 | i | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | i regression | create_property_graph_tests | g4 | i_j | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | i_j + regression | create_property_graph_tests | g4 | k | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | k regression | create_property_graph_tests | g4 | kk | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | kk regression | create_property_graph_tests | g4 | t | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | t regression | create_property_graph_tests | g4 | x | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | x @@ -640,7 +715,7 @@ regression | create_property_graph_tests | g5 | d | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | d regression | create_property_graph_tests | g5 | e | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | e regression | create_property_graph_tests | gc1 | a | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | a - regression | create_property_graph_tests | gc1 | b | character varying | | | | | | regression | pg_catalog | C | | | | | | | regression | pg_catalog | varchar | | | | | b + regression | create_property_graph_tests | gc1 | b | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | b regression | create_property_graph_tests | gc1 | eb | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | eb regression | create_property_graph_tests | gc1 | ek1 | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | ek1 regression | create_property_graph_tests | gc1 | ek2 | integer | | | | | | regression | | | | | | | | | regression | pg_catalog | int4 | | | | | ek2 @@ -651,14 +726,14 @@ regression | create_property_graph_tests | gt | k2 | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | k2 regression | create_property_graph_tests | gt | m | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | m regression | create_property_graph_tests | gt | n | text | | | | | | regression | | | | | | | | | regression | pg_catalog | text | | | | | n -(39 rows) + regression | create_property_graph_tests | gx | p1 | character varying | | | | | | regression | | | | | | | | | regression | pg_catalog | varchar | | | | | p1 +(45 rows) SELECT * FROM information_schema.pg_property_graph_privileges WHERE grantee LIKE 'regress%' ORDER BY property_graph_name, grantor, grantee, privilege_type; grantor | grantee | property_graph_catalog | property_graph_schema | property_graph_name | privilege_type | is_grantable ---------------------+---------------------+------------------------+-----------------------------+---------------------+----------------+-------------- regress_graph_user1 | regress_graph_user1 | regression | create_property_graph_tests | g1 | SELECT | YES - regress_graph_user1 | regress_graph_user2 | regression | create_property_graph_tests | g1 | SELECT | NO -(2 rows) +(1 row) -- test object address functions SELECT pg_describe_object(classid, objid, objsubid) as obj, @@ -768,13 +843,18 @@ CREATE PROPERTY GRAPH create_property_graph_tests.g3 VERTEX TABLES ( t1 KEY (a) PROPERTIES (a, b), - t3 KEY (x) LABEL t3l1 PROPERTIES (x, y, z) LABEL t3l2 PROPERTIES (x, y, z) + t2 KEY (i) PROPERTIES (i, j, k), + t3 KEY (x) LABEL t3l1 PROPERTIES (x, y, z) LABEL t3l2 PROPERTIES (x, y, z) LABEL t3l3 PROPERTIES (x, y, z) + ) + EDGE TABLES ( + e1 KEY (a, i) SOURCE KEY (a) REFERENCES t1 (a) DESTINATION KEY (i) REFERENCES t2 (i) PROPERTIES (a, i, t), + e2 KEY (a, x) SOURCE KEY (a) REFERENCES t1 (a) DESTINATION KEY (x, t) REFERENCES t3 (x, y) PROPERTIES (a, t, x) ) SELECT pg_get_propgraphdef('g4'::regclass); CREATE PROPERTY GRAPH create_property_graph_tests.g4 VERTEX TABLES ( t1 KEY (a) NO PROPERTIES, - t2 KEY (i) PROPERTIES ((i + j) AS i_j, (k * 2) AS kk), + t2 KEY (i) PROPERTIES ((i + j) AS i_j, k, (k * 2) AS kk), t3 KEY (x) LABEL t3l1 PROPERTIES (x, y AS yy) LABEL t3l2 PROPERTIES (x, z AS zz) ) EDGE TABLES ( @@ -887,6 +967,7 @@ DESTINATION KEY (k2) REFERENCES v2tmp(m) ); DROP PROPERTY GRAPH gtmp; +ERROR: unsupported object class: 8318 CREATE PROPERTY GRAPH gtmp VERTEX TABLES (v1 KEY (a), v2tmp KEY (m)) EDGE TABLES ( @@ -895,6 +976,7 @@ DESTINATION KEY (k2) REFERENCES v2tmp(m) ); NOTICE: property graph "gtmp" will be temporary +ERROR: relation "gtmp" already exists ALTER PROPERTY GRAPH g1 ADD VERTEX TABLES (v2tmp KEY (m)); -- error ERROR: cannot add temporary element table to non-temporary property graph diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/privileges.out C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/privileges.out --- C:/cirrus/src/test/regress/expected/privileges.out 2026-03-19 20:56:30.425370100 +0000 +++ C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/privileges.out 2026-03-19 21:03:41.073458300 +0000 @@ -3241,6 +3241,7 @@ drop view atpgv1; drop view atpgv2; drop property graph ptg1; +ERROR: unsupported object class: 8318 DROP AGGREGATE priv_testagg1(int); DROP FUNCTION priv_testfunc2(int); DROP FUNCTION priv_testfunc4(boolean); @@ -3255,10 +3256,19 @@ DROP VIEW atestv4; ERROR: view "atestv4" does not exist DROP TABLE atest1; +ERROR: cannot drop table atest1 because other objects depend on it +DETAIL: vertex atest1 of property graph ptg1 depends on table atest1 +HINT: Use DROP ... CASCADE to drop the dependent objects too. DROP TABLE atest2; +ERROR: cannot drop table atest2 because other objects depend on it +DETAIL: vertex atest2 of property graph ptg1 depends on table atest2 +HINT: Use DROP ... CASCADE to drop the dependent objects too. DROP TABLE atest3; DROP TABLE atest4; DROP TABLE atest5; +ERROR: cannot drop table atest5 because other objects depend on it +DETAIL: vertex atest5 of property graph ptg1 depends on table atest5 +HINT: Use DROP ... CASCADE to drop the dependent objects too. DROP TABLE atest6; DROP TABLE atestc; DROP TABLE atestp1; @@ -3278,11 +3288,52 @@ -- these are needed to clean up permissions REVOKE USAGE ON LANGUAGE sql FROM regress_priv_user1; DROP OWNED BY regress_priv_user1; +ERROR: unsupported object class: 8318 DROP USER regress_priv_user1; +ERROR: role "regress_priv_user1" cannot be dropped because some objects depend on it +DETAIL: owner of function leak(integer,integer) +owner of table atest1 +owner of table atest2 +owner of table atest12 +owner of operator <<<(integer,integer) +owner of view atest12v +owner of view atest12sbv +owner of table atest5 +owner of table mtarget +owner of table msource +owner of table test9a +owner of type test8a +owner of default privileges on new functions belonging to role regress_priv_user1 +owner of default privileges on new types belonging to role regress_priv_user1 +owner of property graph ptg1 DROP USER regress_priv_user2; +ERROR: role "regress_priv_user2" cannot be dropped because some objects depend on it +DETAIL: privileges for table atest1 +privileges for table atest2 +privileges for property graph ptg1 DROP USER regress_priv_user3; +ERROR: role "regress_priv_user3" cannot be dropped because some objects depend on it +DETAIL: privileges for table atest1 +privileges for table atest2 +privileges for table atest5 +privileges for column two of table atest5 DROP USER regress_priv_user4; +ERROR: role "regress_priv_user4" cannot be dropped because some objects depend on it +DETAIL: privileges for table atest1 +privileges for table atest2 +privileges for column one of table atest5 +privileges for column two of table atest5 +privileges for column three of table atest5 +privileges for column four of table atest5 +privileges for table mtarget +privileges for column a of table mtarget +privileges for column b of table mtarget +privileges for column a of table msource +privileges for column b of table msource +privileges for property graph ptg1 DROP USER regress_priv_user5; +ERROR: role "regress_priv_user5" cannot be dropped because some objects depend on it +DETAIL: privileges for table atest2 DROP USER regress_priv_user6; DROP USER regress_priv_user7; DROP USER regress_priv_user8; -- does not exist diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/stats_ext.out C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/stats_ext.out --- C:/cirrus/src/test/regress/expected/stats_ext.out 2026-03-19 20:56:30.467793400 +0000 +++ C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/stats_ext.out 2026-03-19 21:04:00.276598200 +0000 @@ -3331,6 +3331,7 @@ LANGUAGE plpgsql; CREATE OPERATOR <<< (procedure = op_leak, leftarg = int, rightarg = int, restrict = scalarltsel); +ERROR: operator <<< already exists CREATE FUNCTION op_leak(record, record) RETURNS bool AS 'BEGIN RAISE NOTICE ''op_leak => %, %'', $1, $2; RETURN $1 < $2; END' LANGUAGE plpgsql; @@ -3511,6 +3512,7 @@ ALTER TABLE sts_sch1.tbl ALTER COLUMN c SET EXPRESSION AS (a * 3); -- Tidy up DROP OPERATOR <<< (int, int); +ERROR: must be owner of operator <<< DROP FUNCTION op_leak(int, int); DROP OPERATOR <<< (record, record); DROP FUNCTION op_leak(record, record); diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/graph_table.out C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/graph_table.out --- C:/cirrus/src/test/regress/expected/graph_table.out 2026-03-19 20:56:30.349153500 +0000 +++ C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/graph_table.out 2026-03-19 21:04:25.930895500 +0000 @@ -710,14 +710,21 @@ (10 rows) ALTER PROPERTY GRAPH g1 DROP EDGE TABLES (e3_2, e3_3); +ERROR: unsupported object class: 8318 EXECUTE cyclestmt; self | through ------+--------- v12 | v21 v13 | v23 v21 | v12 + v22 | v32 v23 | v13 -(4 rows) + v32 | v22 + v33 | v33 + v33 | v33 + v33 | v33 + v33 | v33 +(10 rows) ALTER PROPERTY GRAPH g1 ADD EDGE TABLES ( @@ -727,6 +734,9 @@ LABEL el2 PROPERTIES (ename, eprop1 * 10 AS lprop2) LABEL l1 PROPERTIES (ename AS elname) ); +ERROR: alias "e3_2" already exists in property graph "g1" +LINE 3: e3_2 KEY (id_3, id_2_1, id_2_2) + ^ EXECUTE cyclestmt; self | through ------+--------- @@ -736,19 +746,32 @@ v22 | v32 v23 | v13 v32 | v22 -(6 rows) + v33 | v33 + v33 | v33 + v33 | v33 + v33 | v33 +(10 rows) ALTER PROPERTY GRAPH g1 ALTER VERTEX TABLE v3 DROP LABEL l1; +ERROR: unsupported object class: 8318 EXECUTE cyclestmt; self | through ------+--------- v12 | v21 v13 | v23 v21 | v12 + v22 | v32 v23 | v13 -(4 rows) + v32 | v22 + v33 | v33 + v33 | v33 + v33 | v33 + v33 | v33 +(10 rows) ALTER PROPERTY GRAPH g1 ALTER VERTEX TABLE v3 ADD LABEL l1 PROPERTIES (vname AS elname); +ERROR: duplicate key value violates unique constraint "pg_propgraph_element_label_element_label_index" +DETAIL: Key (pgelelid, pgellabelid)=(36362, 36343) already exists. EXECUTE cyclestmt; self | through ------+--------- @@ -758,7 +781,11 @@ v22 | v32 v23 | v13 v32 | v22 -(6 rows) + v33 | v33 + v33 | v33 + v33 | v33 + v33 | v33 +(10 rows) ALTER PROPERTY GRAPH g1 ADD EDGE TABLES ( @@ -767,25 +794,21 @@ DESTINATION KEY (src_id) REFERENCES v3 (id) LABEL l2 PROPERTIES (ename AS elname) ); +ERROR: alias "e3_3" already exists in property graph "g1" +LINE 3: e3_3 KEY (src_id, dest_id) + ^ PREPARE loopstmt AS SELECT * FROM GRAPH_TABLE (g1 MATCH (a)-[e IS l2]->(a) COLUMNS (e.elname AS loop)) ORDER BY loop COLLATE "C" ASC; +ERROR: label "l2" does not exist in property graph "g1" EXECUTE loopstmt; - loop ------- - E331 - e331 -(2 rows) - +ERROR: prepared statement "loopstmt" does not exist ALTER PROPERTY GRAPH g1 ALTER EDGE TABLE e3_3 ALTER LABEL l2 DROP PROPERTIES (elname); +ERROR: property graph "g1" element "e3_3" has no label "l2" EXECUTE loopstmt; -- error -ERROR: property "elname" for element variable "e" not found +ERROR: prepared statement "loopstmt" does not exist ALTER PROPERTY GRAPH g1 ALTER EDGE TABLE e3_3 ALTER LABEL l2 ADD PROPERTIES ((ename || '_new')::varchar(10) AS elname); +ERROR: property graph "g1" element "e3_3" has no label "l2" EXECUTE loopstmt; - loop ----------- - E331_new - e331_new -(2 rows) - +ERROR: prepared statement "loopstmt" does not exist -- inheritance and partitioning CREATE TABLE pv (id int, val int); CREATE TABLE cv1 () INHERITS (pv); diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/graph_table_rls.out C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/graph_table_rls.out --- C:/cirrus/src/test/regress/expected/graph_table_rls.out 2026-03-19 20:56:30.350085100 +0000 +++ C:/cirrus/build/testrun/recovery/027_stream_regress/data/results/graph_table_rls.out 2026-03-19 21:04:47.661886700 +0000 @@ -218,6 +218,7 @@ ERROR: query would be affected by row-level security policy for table "document_people" SET SESSION AUTHORIZATION regress_graph_rls_alice; DROP PROPERTY GRAPH cabinet; +ERROR: unsupported object class: 8318 -- -- Table inheritance -- @@ -261,61 +262,36 @@ EDGE TABLES (accessed KEY (aid) SOURCE KEY (uid) REFERENCES users (uid) DESTINATION KEY (did) REFERENCES document (did)); +ERROR: relation "cabinet" already exists GRANT SELECT ON cabinet TO public; SET row_security TO ON; -- viewpoint from regress_graph_rls_bob SET SESSION AUTHORIZATION regress_graph_rls_bob; EXECUTE graph_rls_query; -NOTICE: f_leak => Scientists -NOTICE: f_leak => Paris - pguser | aid | dtitle | dlevel --------------------------+-----+------------+-------- - regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 - regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_dave | 4 | Scientists | 1 - regress_graph_rls_dave | 14 | Paris | 1 -(5 rows) - --- viewpoint from regress_graph_rls_carol -SET SESSION AUTHORIZATION regress_graph_rls_carol; -EXECUTE graph_rls_query; NOTICE: f_leak => Politicians NOTICE: f_leak => Scientists -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo pguser | aid | dtitle | dlevel -------------------------+-----+-------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 - regress_graph_rls_dave | 14 | Paris | 1 -(9 rows) +(5 rows) + +-- viewpoint from regress_graph_rls_carol +SET SESSION AUTHORIZATION regress_graph_rls_carol; +EXECUTE graph_rls_query; + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) -- viewpoint from regress_graph_rls_dave SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -NOTICE: f_leak => Politicians -NOTICE: f_leak => Artists -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York - pguser | aid | dtitle | dlevel --------------------------+-----+-------------+-------- - regress_graph_rls_alice | 5 | Politicians | 2 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 - regress_graph_rls_bob | 11 | Paris | 1 - regress_graph_rls_carol | 2 | Politicians | 2 - regress_graph_rls_carol | 12 | Tokyo | 2 - regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(8 rows) + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) -- RLS policy does not apply to table owner when RLS enabled SET SESSION AUTHORIZATION regress_graph_rls_alice; @@ -325,24 +301,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) SET row_security TO OFF; -- database superuser does bypass RLS policy when disabled @@ -352,24 +320,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- database non-superuser with bypass privilege can bypass RLS policy when disabled SET SESSION AUTHORIZATION regress_graph_rls_exempt_user; @@ -378,24 +338,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- RLS policy does not apply to table owner when RLS disabled SET SESSION AUTHORIZATION regress_graph_rls_alice; @@ -404,32 +356,25 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- When RLS disabled, other users get ERROR. SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -- error -ERROR: query would be affected by row-level security policy for table "document" +ERROR: query would be affected by row-level security policy for table "document_people" -- cleanup SET SESSION AUTHORIZATION regress_graph_rls_alice; DROP PROPERTY GRAPH cabinet; +ERROR: unsupported object class: 8318 ALTER TABLE document_people NO INHERIT document; ALTER TABLE document_places NO INHERIT document; DROP TABLE document; @@ -456,61 +401,36 @@ EDGE TABLES (accessed KEY (aid) SOURCE KEY (uid) REFERENCES users (uid) DESTINATION KEY (did) REFERENCES document (did)); +ERROR: relation "cabinet" already exists GRANT SELECT ON cabinet TO public; SET row_security TO ON; -- viewpoint from regress_graph_rls_bob SET SESSION AUTHORIZATION regress_graph_rls_bob; EXECUTE graph_rls_query; -NOTICE: f_leak => Scientists -NOTICE: f_leak => Paris - pguser | aid | dtitle | dlevel --------------------------+-----+------------+-------- - regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 - regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_dave | 4 | Scientists | 1 - regress_graph_rls_dave | 14 | Paris | 1 -(5 rows) - --- viewpoint from regress_graph_rls_carol -SET SESSION AUTHORIZATION regress_graph_rls_carol; -EXECUTE graph_rls_query; NOTICE: f_leak => Politicians NOTICE: f_leak => Scientists -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo pguser | aid | dtitle | dlevel -------------------------+-----+-------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 - regress_graph_rls_dave | 14 | Paris | 1 -(9 rows) +(5 rows) + +-- viewpoint from regress_graph_rls_carol +SET SESSION AUTHORIZATION regress_graph_rls_carol; +EXECUTE graph_rls_query; + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) -- viewpoint from regress_graph_rls_dave SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -NOTICE: f_leak => Politicians -NOTICE: f_leak => Artists -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York - pguser | aid | dtitle | dlevel --------------------------+-----+-------------+-------- - regress_graph_rls_alice | 5 | Politicians | 2 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 - regress_graph_rls_bob | 11 | Paris | 1 - regress_graph_rls_carol | 2 | Politicians | 2 - regress_graph_rls_carol | 12 | Tokyo | 2 - regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(8 rows) + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) -- RLS policy does not apply to table owner when RLS enabled SET SESSION AUTHORIZATION regress_graph_rls_alice; @@ -520,24 +440,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) SET row_security TO OFF; -- database superuser does bypass RLS policy when disabled @@ -547,24 +459,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- database non-superuser with bypass privilege can bypass RLS policy when disabled SET SESSION AUTHORIZATION regress_graph_rls_exempt_user; @@ -573,24 +477,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- RLS policy does not apply to table owner when RLS disabled SET SESSION AUTHORIZATION regress_graph_rls_alice; @@ -599,29 +495,21 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- When RLS disabled, other users get ERROR. SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -- error -ERROR: query would be affected by row-level security policy for table "document" +ERROR: query would be affected by row-level security policy for table "document_people" -- -- Recursion through GRAPH_TABLE also throws error -- @@ -635,7 +523,10 @@ COLUMNS (a.aid)))); SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -- error -ERROR: infinite recursion detected in policy for relation "document" + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) + SET SESSION AUTHORIZATION regress_graph_rls_alice; DROP POLICY pr ON document; -- @@ -652,22 +543,9 @@ USING (dtitle <> 'Scientists'); SET SESSION AUTHORIZATION regress_graph_rls_dave; EXECUTE graph_rls_query; -NOTICE: f_leak => Politicians -NOTICE: f_leak => Artists -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York - pguser | aid | dtitle | dlevel --------------------------+-----+-------------+-------- - regress_graph_rls_alice | 5 | Politicians | 2 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 - regress_graph_rls_bob | 11 | Paris | 1 - regress_graph_rls_carol | 2 | Politicians | 2 - regress_graph_rls_carol | 12 | Tokyo | 2 - regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(8 rows) + pguser | aid | dtitle | dlevel +--------+-----+--------+-------- +(0 rows) -- -- Default deny policy, FORCE ROW LEVEL SECURITY @@ -678,9 +556,16 @@ -- default deny policy applies to non-owners, non-rls-exempt and non-superusers SET SESSION AUTHORIZATION regress_graph_rls_bob; EXECUTE graph_rls_query; - pguser | aid | dtitle | dlevel ---------+-----+--------+-------- -(0 rows) +NOTICE: f_leak => Politicians +NOTICE: f_leak => Scientists + pguser | aid | dtitle | dlevel +-------------------------+-----+-------------+-------- + regress_graph_rls_alice | 5 | Politicians | 2 + regress_graph_rls_bob | 1 | Scientists | 1 + regress_graph_rls_carol | 2 | Politicians | 2 + regress_graph_rls_carol | 3 | Scientists | 1 + regress_graph_rls_dave | 4 | Scientists | 1 +(5 rows) -- Deny RLS policy does not apply to table owner, superuser or RLS exempt user SET SESSION AUTHORIZATION regress_graph_rls_exempt_user; @@ -689,24 +574,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) RESET SESSION AUTHORIZATION; EXECUTE graph_rls_query; @@ -714,24 +591,16 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) SET SESSION AUTHORIZATION regress_graph_rls_alice; EXECUTE graph_rls_query; @@ -739,36 +608,52 @@ NOTICE: f_leak => Artists NOTICE: f_leak => Scientists NOTICE: f_leak => Unspeakables -NOTICE: f_leak => Paris -NOTICE: f_leak => Tokyo -NOTICE: f_leak => New York pguser | aid | dtitle | dlevel -------------------------+-----+--------------+-------- regress_graph_rls_alice | 5 | Politicians | 2 regress_graph_rls_alice | 6 | Unspeakables | 100 - regress_graph_rls_alice | 13 | New York | 3 - regress_graph_rls_alice | 15 | Tokyo | 2 regress_graph_rls_bob | 1 | Scientists | 1 - regress_graph_rls_bob | 11 | Paris | 1 regress_graph_rls_carol | 2 | Politicians | 2 regress_graph_rls_carol | 3 | Scientists | 1 - regress_graph_rls_carol | 12 | Tokyo | 2 regress_graph_rls_dave | 4 | Scientists | 1 regress_graph_rls_dave | 7 | Artists | 3 - regress_graph_rls_dave | 14 | Paris | 1 -(12 rows) +(7 rows) -- FORCE ROW LEVEL SECURITY applies RLS to owners too ALTER TABLE document FORCE ROW LEVEL SECURITY; EXECUTE graph_rls_query; - pguser | aid | dtitle | dlevel ---------+-----+--------+-------- -(0 rows) +NOTICE: f_leak => Politicians +NOTICE: f_leak => Artists +NOTICE: f_leak => Scientists +NOTICE: f_leak => Unspeakables + pguser | aid | dtitle | dlevel +-------------------------+-----+--------------+-------- + regress_graph_rls_alice | 5 | Politicians | 2 + regress_graph_rls_alice | 6 | Unspeakables | 100 + regress_graph_rls_bob | 1 | Scientists | 1 + regress_graph_rls_carol | 2 | Politicians | 2 + regress_graph_rls_carol | 3 | Scientists | 1 + regress_graph_rls_dave | 4 | Scientists | 1 + regress_graph_rls_dave | 7 | Artists | 3 +(7 rows) SET row_security TO OFF; EXECUTE graph_rls_query; -- error -ERROR: query would be affected by row-level security policy for table "document" -HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY. +NOTICE: f_leak => Politicians +NOTICE: f_leak => Artists +NOTICE: f_leak => Scientists +NOTICE: f_leak => Unspeakables + pguser | aid | dtitle | dlevel +-------------------------+-----+--------------+-------- + regress_graph_rls_alice | 5 | Politicians | 2 + regress_graph_rls_alice | 6 | Unspeakables | 100 + regress_graph_rls_bob | 1 | Scientists | 1 + regress_graph_rls_carol | 2 | Politicians | 2 + regress_graph_rls_carol | 3 | Scientists | 1 + regress_graph_rls_dave | 4 | Scientists | 1 + regress_graph_rls_dave | 7 | Artists | 3 +(7 rows) + -- Clean up DEALLOCATE graph_rls_query; -- leave objects behind for pg_upgrade/pg_dump tests