Why not sub-selects in targetlists?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Why not sub-selects in targetlists?
Date: 1999-08-29 17:47:55
Message-ID: 12706.935948875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

For some reason we currently support sub-SELECT expressions only
in WHERE and HAVING clauses, not in the target list of a SELECT.
Does anyone know why this is?

There are a number of places in the planner/optimizer that would need
to be fixed to make it happen, but the changes are utterly trivial
(calling certain transformation routines on the targetlist as well as
for WHERE and HAVING ... probably about a dozen lines total ...).
And a quick look at the executor doesn't show any reason why it would
have a problem, either. Is there something fundamental that I'm
missing? If not, why wasn't this done to begin with?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-08-29 19:39:29 Re: [HACKERS] PostgreSQL 6.5.2
Previous Message Tom Lane 1999-08-29 16:50:08 Re: [HACKERS] PostgreSQL 6.5.2