trigger problem - Mailing list pgsql-sql

From Jan Verheyden
Subject trigger problem
Date
Msg-id E30C7040DE22624185BAD4093190B54437BE5DB44E@EX2007-MBX-2.uz.kuleuven.ac.be
Whole thread Raw
List pgsql-sql
<div class="Section1"><p class="MsoNormal">Hi,<p class="MsoNormal"> <p class="MsoNormal">If I try this to run in a
triggerfunction<p class="MsoNormal"> <p class="MsoNormal">‘<i>perform dblink_connect('myconnect','dbname=postgres
password=uzleuven');</i><pclass="MsoNormal"><i>perform dblink_exec('myconnect', 'insert into test (uid) values (' ||
quote_literal(NEW.pat_id)|| ')');</i><p class="MsoNormal"><i>return new;</i><p class="MsoNormal"><i>perform
dblink_disconnect('myconnect');</i>’<pclass="MsoNormal"> <p class="MsoNormal"> <p class="MsoNormal"> <p
class="MsoNormal">Iget the message <p class="MsoNormal"> <p class="MsoNormal">‘<span style="color:red">ERROR: duplicate
connectionname</span><p class="MsoNormal"><span style="color:red">SQL state: 42710</span><p class="MsoNormal"><span
style="color:red">Context:SQL statement "SELECT  dblink_connect('myconnect','dbname=postgres
password=uzleuven')"</span><pclass="MsoNormal"><span style="color:red">PL/pgSQL function "test_update_trigger" line 2
atperform</span>’<p class="MsoNormal"> <p class="MsoNormal">This happens only in one of my two databases, anyone an
idea?<pclass="MsoNormal"> <p class="MsoNormal"> <p class="MsoNormal">Regards,<p class="MsoNormal">Jan</div> 

pgsql-sql by date:

Previous
From: "Klas Stockhem"
Date:
Subject: Re: Problems when copy data from dump file
Next
From: "Klas Stockhem"
Date:
Subject: Problems when copy data from dump file