Re: dblink questions

From: Joe Conway <mail(at)joeconway(dot)com>
To: Brian Maguire <bmaguire(at)vantage(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dblink questions
Date: 2003-12-09 00:22:30
Message-ID: 3FD515C6.5020607@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brian Maguire wrote:
> What's the best way to create a connection with dblink with persisted
> connections for web applications?
>

It all depends on how you intend to use the dblink connections.

If your web page connects to Postgres, issues a single query using
dblink (via a view or whatever), and then completes, you don't need a
persistent dblink connection -- just use the explicit connection syntax.

If, on the other hand, your web page connects to Postgres, issues
several queries using dblink (via a view or whatever), and then
completes, it would make sense to use a persistent dblink connection. In
that case, execute dblink_connect() before you execute your queries. Use
named persistent connections if you need more than one, anonymous otherwise.

HTH,

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Victor B. Berdin 2003-12-09 01:49:15 pgsql 7.4 on minimal environment
Previous Message Socketd 2003-12-09 00:11:03 OO database?