Re: Adding CORRESPONDING to Set Operations - Mailing list pgsql-hackers

From Kerem Kat
Subject Re: Adding CORRESPONDING to Set Operations
Date
Msg-id CAJZSWkWHxeb5-O2k30riBrSWsvRsBg_eueVg+8QqLZzKerfQww@mail.gmail.com
Whole thread Raw
In response to Adding CORRESPONDING to Set Operations  (Kerem Kat <keremkat@gmail.com>)
List pgsql-hackers
Is it feasible to implement the CORRESPONDING [BY (expr_list)] statement in set operations by the following changes:

i) In analyze.c:transformSetOperationStmt after parsing left and right queries as subnodes to a set operation tree,
    a) CORRESPONDING: Find matching column targets from both statements, eliminate unmatching targets and proceed.
    b) CORRESPONDING BY (expr_list): Verify expr_list columns exist in both select statements. Eliminate unmatched column names to expr_list and proceed.
ii) Instead of elimination set TargetEntry->resjunk = true for unwanted output columns.


Thank you for your attention,
Any comments are welcome.

Kerem KAT

On Sun, Sep 18, 2011 at 12:39, Kerem Kat <keremkat@gmail.com> wrote:
Hello,

I am new to postgresql code, I would like to start implementing easyish TODO items. I have read most of the development guidelines, faqs, articles by Greg Smith (Hacking Postgres with UDFs, Adding WHEN to triggers).

The item I would like to implement is adding CORRESPONDING [BY (col1[,col2,...]])] to INTERSECT and EXCEPT operators.

Can anyone comment on how much effort this item needs?


regards, kerem kat.

pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: Cross-compile of 3rd-party extensions fails
Next
From: Vitor Reus
Date:
Subject: CUDA Sorting