pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: francescoboccacci@libero.it <francescoboccacci@libero.it>
To: mail@joeconway.com
Cc: pgsql-admin@postgresql.org
Subject: R: Re: dblink question about duplicate connection
Date: Wed, 3 Aug 2011 09:02:32 +0200 (CEST)
Message-ID: <30237998.4729401312354952745.JavaMail.defaultUser@defaultHost> (raw)

Thanks, I solved it with your help.

Francesco Boccacci

>----Messaggio originale----
>Da: mail@joeconway.com
>Data: 02/08/2011 22.46
>A: "francescoboccacci@libero.it"<francescoboccacci@libero.it>
>Cc: <pgsql-admin@postgresql.org>
>Ogg: Re: [ADMIN] dblink question about duplicate connection
>
>On 08/02/2011 05:36 AM, francescoboccacci@libero.it wrote:
>> Somentimes happend that an error accours in insert data and when i try to 
run 
>> new insert posgresql return and error like duplicate connection.
>> I would like to change my functions in this way:
>
>>      If 'conn_test' exist  PERFORM dblink_disconnect('conn_test');
>>      else
>> 
>>      PERFORM dblink_connect('conn_test', 'dbname=database_test');
>
>> How can write my new function?
>
>See dblink_get_connections():
>http://www.postgresql.org/docs/9.0/interactive/contrib-dblink-get-connections.
html
>
>HTH,
>
>Joe
>
>-- 
>Joe Conway
>credativ LLC: http://www.credativ.us
>Linux, PostgreSQL, and general Open Source
>Training, Service, Consulting, & 24x7 Support
>
>-- 
>Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-admin
>





Message-ID: <30237998.4729401312354952745.JavaMail.defaultUser@defaultHost>
Permalink:  ../30237998.4729401312354952745.JavaMail.defaultUser@defaultHost/
Also on:    postgresql.org/message-id/30237998.4729401312354952745.JavaMail.defaultUser@defaultHost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: francescoboccacci@libero.it, mail@joeconway.com
  Subject: Re: R: Re: dblink question about duplicate connection
  In-Reply-To: <30237998.4729401312354952745.JavaMail.defaultUser@defaultHost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox