This my trigger that will trigger if new value is inserted in origin.
I want to store the result of recursive to table(extract).
I get this error
ERROR: syntax error at or near "perform"
LINE 10: perform * from "test";
^
SQL state: 42601
Character: 221
BEGIN
WITH RECURSIVE "test" as
(select "node_f", "node_2", "edge"
from "con" where "node_f"= new."origin"
union
select O."node_f", O."node_2", O."edge"
FROM "test" N
JOIN "con" O on O."node_f" = N."node_2")
Select * from "test";
INSERT INTO "extract"
SELECT * FROM "test";
return new;
END;
perform. Where is that keyword in your code?Select * from "test";for some reason. Remove the first occurrence, theINSERTstatement should be part of theWITH, not a separate statement (with a semicolon in between).