Re: Adding CORRESPONDING to Set Operations

From: Kerem Kat <keremkat(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adding CORRESPONDING to Set Operations
Date: 2011-09-19 08:57:03
Message-ID: CAJZSWkWHxeb5-O2k30riBrSWsvRsBg_eueVg+8QqLZzKerfQww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)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.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitor Reus 2011-09-19 12:11:14 CUDA Sorting
Previous Message Boszormenyi Zoltan 2011-09-19 08:54:35 Re: Cross-compile of 3rd-party extensions fails