Skip to content

Commit 6606d26

Browse files
committed
fix: qualify column refs in store lookup to resolve ambiguous database_id
1 parent ab734c0 commit 6606d26

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

pgpm/constructive-compute/deploy/schemas/constructive_compute_public/procedures/platform_create_function_graph/procedure.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ DECLARE
1717
v_store_id uuid;
1818
v_graph_id uuid;
1919
BEGIN
20-
SELECT id
21-
FROM "constructive_platform_function_graph_public".platform_function_graph_store
20+
SELECT s.id
21+
FROM "constructive_platform_function_graph_public".platform_function_graph_store AS s
2222
WHERE
23-
database_id = platform_create_function_graph.database_id
24-
AND name = platform_create_function_graph.name
23+
s.database_id = platform_create_function_graph.database_id
24+
AND s.name = platform_create_function_graph.name
2525
INTO v_store_id;
2626
IF v_store_id IS NULL THEN
2727
INSERT INTO "constructive_platform_function_graph_public".platform_function_graph_store (

pgpm/constructive-compute/sql/constructive-compute--0.0.1.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,11 @@ DECLARE
842842
v_store_id uuid;
843843
v_graph_id uuid;
844844
BEGIN
845-
SELECT id
846-
FROM "constructive_platform_function_graph_public".platform_function_graph_store
845+
SELECT s.id
846+
FROM "constructive_platform_function_graph_public".platform_function_graph_store AS s
847847
WHERE
848-
database_id = platform_create_function_graph.database_id
849-
AND name = platform_create_function_graph.name
848+
s.database_id = platform_create_function_graph.database_id
849+
AND s.name = platform_create_function_graph.name
850850
INTO v_store_id;
851851
IF v_store_id IS NULL THEN
852852
INSERT INTO "constructive_platform_function_graph_public".platform_function_graph_store (

0 commit comments

Comments
 (0)