Table/Data extension model available? - Mailing list pgsql-interfaces

From Jim Renwick
Subject Table/Data extension model available?
Date
Msg-id 3cd1ec380901301251p6d57e3a1k37126680c435b21@mail.gmail.com
Whole thread Raw
List pgsql-interfaces
Hi,

Not sure where to ask this question.

I have been going over the docs in some detail, and I see where
http://www.postgresql.org/docs/8.2/static/xfunc-sql.html#XFUNC-SQL-TABLE-FUNCTIONS
discusses options for building server extensions that will allow a
user to use custom functions in the FROM clause of a SQL statement. It
looks like I could build a custom C function that returns a SETOF
custom type to simulate retrieval of data from an external source.
However, it looks like the syntax of the function would require '()'
after the table name, effectively changing the SQL syntax. So, for
example:
 select * from internal_table i, function_simulating_external_table()
e where i.id = e.id;

I am guessing that will grab data from PGDATA table internal_table,
and the results of executing whatever backs
function_simulating_external_table() - say a web service - produces.
Is that correct?

At the end of the day, I am wondering if there is a way to use the SQL
engine in postgres as a frontend to running distributed queries across
arbitrary backend data providers. Does anyone know if this is common
and simple to do?

Thanks,
Jim Renwick


pgsql-interfaces by date:

Previous
From: Sean Davis
Date:
Subject: Re: [GENERAL] PGSQL and Javascript
Next
From: Allan Kamau
Date:
Subject: Re: [GENERAL] PGSQL and Javascript