From: | Jim Renwick <jimrenwick(at)gmail(dot)com> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Table/Data extension model available? |
Date: | 2009-01-30 20:51:52 |
Message-ID: | 3cd1ec380901301251p6d57e3a1k37126680c435b21@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Oliveiros Cristina | 2009-02-02 18:56:19 | How to pass NULL on a NpgsqlParameter |
Previous Message | Sean Davis | 2009-01-30 13:02:20 | Re: [INTERFACES] PGSQL and Javascript |