Re: One more question regarding dblink - Mailing list pgsql-hackers

From Joe Conway
Subject Re: One more question regarding dblink
Date
Msg-id 3E9D8293.3020700@joeconway.com
Whole thread Raw
In response to One more question regarding dblink  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Responses Re: One more question regarding dblink  (Kevin Brown <kevin@sysexperts.com>)
Re: One more question regarding dblink  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List pgsql-hackers
Shridhar Daithankar wrote:
> 1. Why is that dblink allows only one persistent connection? It should allow 
> more than one persistent connections to same or different databases, 
> searchable by name. Of course we do not expect number of remote connection to 
> be huge. So a simple structure would suffice.

Great idea, and I wanted to do that eventually (again, possibly for 
7.4), but I didn't have the time last year when I updated dblink for 
7.3. And again, patches gratefully accepted.

> 2. To create a persistent connection, one has to call dblink_connect 
> explicitly. Oracle allows a database link connection to be part of database 
> schema. Hence when a database comes up it brings the database link up as 
> well.
> 
> Is there an equivalent of .profile/.logout  per database/per schema/per table 
> in postgresql? That should be an ideal place to put a database link 
> initiation/termination.

As Tom has mentioned within the last day or two, the right answer is not 
to emulate Oracle, but instead to implement external data access per the 
SQL-MED spec. That has been discussed at some length in the past -- 
search the archives. As it is not a small undertaking, and I had other 
higher personal priorities during this release cycle, it will not happen 
for 7.4. Perhaps I'll take it on for 7.5 (but then again, perhaps not).

Joe



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: DBLink cursors
Next
From: Robert Treat
Date:
Subject: Re: Many comments (related to "Are we losing momentum?")