Hi, If I try this to run in a trigger function
'perform dblink_connect('myconnect','dbname=postgres password=uzleuven'); perform dblink_exec('myconnect', 'insert into test (uid) values (' || quote_literal(NEW.pat_id) || ')'); return new; perform dblink_disconnect('myconnect');' I get the message 'ERROR: duplicate connection name SQL state: 42710 Context: SQL statement "SELECT dblink_connect('myconnect','dbname=postgres password=uzleuven')" PL/pgSQL function "test_update_trigger" line 2 at perform' This happens only in one of my two databases, anyone an idea? Regards, Jan