From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ronan Dunklau <rdunklau(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Arguments to foreign tables? |
Date: | 2012-11-07 05:33:41 |
Message-ID: | 1352266421.6292.73.camel@jdavis-laptop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-11-07 10:16:46 | Re: WIP patch for hint bit i/o mitigation |
Previous Message | Amit Kapila | 2012-11-07 04:19:06 | Re: Proposal for Allow postgresql.conf values to be changed via SQL |