Re: [HACKERS] Why not sub-selects in targetlists?

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Why not sub-selects in targetlists?
Date: 1999-08-30 01:39:50
Message-ID: 37C9E0E6.AFD53DBE@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> 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?

As usual, I just hadn't time to do more than it's done for
6.3.X -:) Subselects were not in my TODO list, I made base
implementation because of there were many requests for them.

BTW, please don't forget subselects in FROM.

Vadim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1999-08-30 02:02:59 Re: [HACKERS] PostgreSQL 6.5.2
Previous Message Hannu Krosing 1999-08-29 20:23:54 Re: [HACKERS] ANSI SQL compliance