Re: [HACKERS] minimizing the target list for foreign data wrappers

2013-04-25 Thread Tom Lane
David Gudeman dave.gude...@gmail.com writes: One of the problems I'm having is that in my application, the foreign tables typically have hundreds of columns while typical queries only access a dozen or so (the foreign server is a columnar SQL database). Furthermore, there is no size

Re: [HACKERS] minimizing the target list for foreign data wrappers

2013-04-23 Thread David Gudeman
In case anyone is interested, I tried it and it doesn't seem to work. It looks like some other plan element already has the target-list tuple baked. Now I'm trying to decide whether to give up on FDW. It's a shame because it's such a sweet facility, but at this point, I just don't think that it's

Re: [HACKERS] minimizing the target list for foreign data wrappers

2013-04-23 Thread David Fetter
David, Please post your patch(es) and some demo of how things broke so others can improve future versions--possibly even 9.3 versions if it turns out you've discovered a bug in the implementation. Thanks very much for your hard work and insights into this. Cheers, David. On Tue, Apr 23, 2013 at

Re: [HACKERS] minimizing the target list for foreign data wrappers

2013-04-22 Thread David Gudeman
Re-reading my first email I thought it was a little confusing, so here is some clarification. In GetForeignPlan, tlist seems to be a target list for a basic select * from the foreign table. For the ith TargetEntry te in tlist, it seems that te-expr is a var with varattno=i. I was mis-remembering

[HACKERS] minimizing the target list for foreign data wrappers

2013-04-21 Thread David Gudeman
A few years ago I wrote a roll-your-own foreign-data-wrapper system for Postgres because Postgres didn't have one at the time (some details herehttp://unubtainabol.blogspot.com/2013/04/daves-foreign-data-introuction.htmlif anyone is interested). Now I'm being tasked to move it to Postgres 9.2.x