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.