do a merge instead of an insert
This commit is contained in:
parent
d77b7910d5
commit
64af23cf04
@ -35,7 +35,7 @@ BEGIN
|
||||
--HAVING
|
||||
-- string_agg(cname,', ') FILTER (WHERE fkey = func) <> ''
|
||||
loop
|
||||
INSERT INTO fc.sql SELECT f.func, f.ddl;
|
||||
INSERT INTO fc.sql SELECT f.func, f.ddl ON CONFLICT ON CONSTRAINT sql_pkey DO UPDATE SET t = EXCLUDED.t;
|
||||
EXECUTE format('%s',f.ddl);
|
||||
EXECUTE format('%s',f.pop);
|
||||
EXECUTE format('%s',f.fk);
|
||||
|
Loading…
Reference in New Issue
Block a user