On Tue, 2012-11-06 at 12:57 -0500, Tom Lane wrote:
> That particular example can be handled perfectly well today, with
> 
>       select * from stream_table where tscol < 'whatever';
> 
> The FDW could be coded to throw an error if the query doesn't provide a
> WHERE clause that constrains the timestamp column suitably.  It does
> mean that you have to expose the "argument" as a result column, but at
> least for this use-case that hardly seems like a problem.

Oh, interesting idea to require a WHERE clause that way. I guess, in
theory, you could have an operator that always returns TRUE, and pass
everything down in WHERE clauses that way.

I think there is a case for actual arguments though: remote settings for
GUCs (as Simon pointed out); maybe the host to get the data from if it's
available from several locations; and if we support defining the schema
on the fly (like SRFs that return RECORD) then you could pass column
lists.

Regards,
        Jeff Davis



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to