Re: Arguments to foreign tables?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Ronan Dunklau <rdunklau(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Arguments to foreign tables?
Date: 2012-11-06 16:32:24
Message-ID: CAFj8pRC-wKi8ag5SSCB8wmJT+8ZouiFuKFNMjPT297qXnrO9pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/11/6 Jeff Davis <pgsql(at)j-davis(dot)com>:
> On Tue, 2012-11-06 at 09:19 +0100, Ronan Dunklau wrote:
>> Maybe you could set some options on the foreign table before selecting
>> from it ?
>> Another way you could achieve the same result would be to give some
>> column a special meaning (like it is done in the twitter_fdw for
>> example).
>>
>>
>> If you don't mind, do you have a specific use-case for this ?
>>
> Let's say that your remote data source is a stream of data that is not
> actually being stored anywhere, e.g. network events. The data you want
> to retrieve are all events with a timestamp less than X, and you assume
> that the timestamp is monotonically increasing (so as soon as you get to
> X, the read is finished).
>
> An SRF isn't good enough because it always materializes (and that's the
> only way it allows you to control initialization and teardown of the
> stream connection). But you don't want to have to define a new foreign
> table each time. It would be better if there were a way to pass the
> argument X to the FDW mechanism.

An SRF must not materialize always - depends on implementation

Regards

Pavel

>
> Regards,
> Jeff Davis
>
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-06 16:35:49 Re: FDW for PostgreSQL
Previous Message Jeff Davis 2012-11-06 16:18:19 Re: Arguments to foreign tables?