From: Jim Renwick <jimrenwick@gmail.com>
To: pgsql-interfaces@postgresql.org
Subject: Table/Data extension model available?
Date: Fri, 30 Jan 2009 13:51:52 -0700
Message-ID: <3cd1ec380901301251p6d57e3a1k37126680c435b21@mail.gmail.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jimrenwick@gmail.com
Subject: Re: Table/Data extension model available?
In-Reply-To: <3cd1ec380901301251p6d57e3a1k37126680c435b21@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox