| From: | Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk> | 
|---|---|
| To: | pgsql-general(at)PostgreSQL(dot)org | 
| Subject: | Re: Procedural language functions across servers | 
| Date: | 2006-07-10 21:20:57 | 
| Message-ID: | 44B2C4B9.FC5586EE@telemetry.co.uk | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
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]
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Crawford | 2006-07-10 21:32:40 | Re: US Telephone Number Type | 
| Previous Message | Nikolay Samokhvalov | 2006-07-10 20:42:16 | Re: Getting Primary Key Value After Insert |