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