Re: Arguments to foreign tables?

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Arguments to foreign tables?
Дата
Msg-id 1352266421.6292.73.camel@jdavis-laptop
обсуждение исходный текст
Ответ на Re: Arguments to foreign tables?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: WIP patch for hint bit i/o mitigation