Search Postgresql Archives

Re: Procedural language functions across servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Fuhr wrote:

> dbi-link is an alternative to dblink that uses Perl/DBI:
> 
> http://pgfoundry.org/projects/dbi-link/
> 
> > is this the only way available if additional procedural languages
> > are installed?
> 
> With the untrusted version of a language you can do essentially
> anything that language supports.  For example, with plperlu, you
> could use DBI to open a connection to another database (even another
> DBMS like Oracle, MySQL, etc.), issue a query, fetch the results,
> and do whatever you want with those results.  Example:
> 
> CREATE FUNCTION remote_version(text, text, text) RETURNS text AS $$
>   use DBI;

As a related question, assume I have PostgreSQL on an application server X with
functions a() and b() defined to use some method (dblink or whatever) to return
a result set from a remote backend server.

If X runs a complex query including references to a() and b() which themselves
initiate complex queries on backend servers A and B, can I tell X's planner to
run a(A) and b(B) simultaneously, or is the only way to have these in distinct
sessions storing their results in tables on X?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux