Maybe you could set some options on the foreign table before selecting from
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 ?
2012/11/6 Jeff Davis <pgsql(at)j-davis(dot)com>
> On Sun, 2012-11-04 at 15:13 -0500, Tom Lane wrote:
> > Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> > > Is there any fundamental or philosophical reason why a foreign table
> > > can't accept arguments?
> > That isn't a table; it's some sort of function. Now that we have
> > LATERAL, there is no good reason to contort SQL's syntax and semantics
> > in the direction you suggest.
> Maybe I should rephrase this as a problem with SRFs: you don't get to
> define the init/exec/end executor functions, and you don't get access to
> the optimizer information.
> It seems like foreign tables are a better mechanism (except for the
> simple cases where you don't care about the details), and the only thing
> an SRF can do that a foreign table can't is accept arguments. So, I
> thought maybe it would make more sense to combine the mechanisms
> Take something as simple as generate_series: right now, it materializes
> the entire thing if it's in the FROM clause, but it wouldn't need to if
> it could use the foreign table mechanism.
> Jeff Davis
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
In response to
pgsql-hackers by date
|Next:||From: Simon Riggs||Date: 2012-11-06 08:35:35|
|Subject: Re: Arguments to foreign tables?|
|Previous:||From: Etsuro Fujita||Date: 2012-11-06 06:39:15|
|Subject: Re: Update obsolete text in indexam.sgml|