Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-17 Thread Hitoshi Harada
On Mon, Nov 14, 2011 at 6:09 AM, Kerem Kat kerem...@gmail.com wrote: On Mon, Nov 14, 2011 at 15:32, Tom Lane t...@sss.pgh.pa.us wrote: Kerem Kat kerem...@gmail.com writes: Corresponding is currently implemented in the parse/analyze phase. If it were to be implemented in the planning phase,

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-14 Thread Thom Brown
On 25 October 2011 18:49, Kerem Kat kerem...@gmail.com wrote: On Mon, Oct 24, 2011 at 20:52, Erik Rijkers e...@xs4all.nl wrote: On Wed, October 19, 2011 15:01, Kerem Kat wrote: Adding CORRESPONDING to Set Operations Initial patch, filename: corresponding_clause_v2.patch I had a quick look at

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-14 Thread Kerem Kat
This explain plan doesn't look right to me: test=# explain select a,b,c from one intersect corresponding by (a,c) select a,b,c from two;                                   QUERY PLAN -  HashSetOp Intersect  

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-14 Thread Thom Brown
On 14 November 2011 11:29, Kerem Kat kerem...@gmail.com wrote: This explain plan doesn't look right to me: test=# explain select a,b,c from one intersect corresponding by (a,c) select a,b,c from two; QUERY PLAN

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-14 Thread Tom Lane
Kerem Kat kerem...@gmail.com writes: Corresponding is currently implemented in the parse/analyze phase. If it were to be implemented in the planning phase, explain output would likely be as you expect it to be. It's already been pointed out to you that doing this at parse time is unacceptable,

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-11-14 Thread Kerem Kat
On Mon, Nov 14, 2011 at 15:32, Tom Lane t...@sss.pgh.pa.us wrote: Kerem Kat kerem...@gmail.com writes: Corresponding is currently implemented in the parse/analyze phase. If it were to be implemented in the planning phase, explain output would likely be as you expect it to be. It's already

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-10-25 Thread Erik Rijkers
On Tue, October 25, 2011 19:49, Kerem Kat wrote: On Mon, Oct 24, 2011 at 20:52, Erik Rijkers e...@xs4all.nl wrote: On Wed, October 19, 2011 15:01, Kerem Kat wrote: Adding CORRESPONDING to Set Operations I have corrected the ordering of the targetlists of subqueries. And added 12 regression

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-10-25 Thread Kerem Kat
On Mon, Oct 24, 2011 at 20:52, Erik Rijkers e...@xs4all.nl wrote: On Wed, October 19, 2011 15:01, Kerem Kat wrote: Adding CORRESPONDING to Set Operations Initial patch, filename: corresponding_clause_v2.patch I had a quick look at the behaviour of this patch. Btw, the examples in your email

Re: [HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-10-24 Thread Erik Rijkers
On Wed, October 19, 2011 15:01, Kerem Kat wrote: Adding CORRESPONDING to Set Operations Initial patch, filename: corresponding_clause_v2.patch I had a quick look at the behaviour of this patch. Btw, the examples in your email were typoed (one select is missing): SELECT 1 a, 2 b, 3 c UNION

[HACKERS] (PATCH) Adding CORRESPONDING to Set Operations

2011-10-19 Thread Kerem Kat
Adding CORRESPONDING to Set Operations Initial patch, filename: corresponding_clause_v2.patch This patch adds CORRESPONDING clause to set operations according to SQL20nn standard draft as Feature F301, CORRESPONDING in query expressions Corresponding clause either contains a BY(...) clause or