From dda1111723540174c40e25e59cce587b20897eea Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 17 Dec 2025 08:37:15 +0100 Subject: [PATCH 1/3] Add test for properties typmod mismatch --- src/test/regress/expected/create_property_graph.out | 10 ++++++++++ src/test/regress/sql/create_property_graph.sql | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/src/test/regress/expected/create_property_graph.out b/src/test/regress/expected/create_property_graph.out index dbaf65c4d59..d177159ed72 100644 --- a/src/test/regress/expected/create_property_graph.out +++ b/src/test/regress/expected/create_property_graph.out @@ -162,6 +162,16 @@ DETAIL: In a property graph, a property of the same name has to have the same d ALTER PROPERTY GRAPH g2 ALTER VERTEX TABLE t1 ADD LABEL foo PROPERTIES (b AS k); -- type mismatch ERROR: property "k" data type mismatch: integer vs. text DETAIL: In a property graph, a property of the same name has to have the same data type in each label. +CREATE TABLE t1x (a int, b varchar(10)); +CREATE TABLE t2x (i int, j varchar(15)); +CREATE PROPERTY GRAPH gx + VERTEX TABLES ( + t1x KEY (a) PROPERTIES (b AS p1), + t2x KEY (i) PROPERTIES (j AS p1) -- typmod mismatch + ); +ERROR: property "p1" data type modifier mismatch: 14 vs. 19 +DETAIL: In a property graph, a property of the same name has to have the same type modifier in each label. +DROP TABLE t1x, t2x; CREATE PROPERTY GRAPH gx VERTEX TABLES ( t1 KEY (a) LABEL l1 PROPERTIES (a, a AS aa), diff --git a/src/test/regress/sql/create_property_graph.sql b/src/test/regress/sql/create_property_graph.sql index 6ace22fe7c9..ab73e340cc3 100644 --- a/src/test/regress/sql/create_property_graph.sql +++ b/src/test/regress/sql/create_property_graph.sql @@ -126,6 +126,15 @@ CREATE PROPERTY GRAPH gx ); ALTER PROPERTY GRAPH g2 ALTER VERTEX TABLE t1 ADD LABEL foo PROPERTIES (b AS k); -- type mismatch +CREATE TABLE t1x (a int, b varchar(10)); +CREATE TABLE t2x (i int, j varchar(15)); +CREATE PROPERTY GRAPH gx + VERTEX TABLES ( + t1x KEY (a) PROPERTIES (b AS p1), + t2x KEY (i) PROPERTIES (j AS p1) -- typmod mismatch + ); +DROP TABLE t1x, t2x; + CREATE PROPERTY GRAPH gx VERTEX TABLES ( t1 KEY (a) LABEL l1 PROPERTIES (a, a AS aa), -- 2.52.0