Skip site navigation (1) Skip section navigation (2)

Table/Data extension model available?

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

Not sure where to ask this question.

I have been going over the docs in some detail, and I see where
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

  select * from internal_table i, function_simulating_external_table()
e where =;

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?

Jim Renwick

pgsql-interfaces by date

Next:From: Oliveiros CristinaDate: 2009-02-02 18:56:19
Subject: How to pass NULL on a NpgsqlParameter
Previous:From: Sean DavisDate: 2009-01-30 13:02:20
Subject: Re: [INTERFACES] PGSQL and Javascript

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group