From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andreas(dot)Zeugswetter(at)telecom(dot)at (Zeugswetter Andreas DBT) |
Cc: | pgsql-hackers(at)hub(dot)org |
Subject: | Re: [HACKERS] Re: subselects |
Date: | 1998-01-21 15:09:37 |
Message-ID: | 199801211509.KAA20838@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> Bruce wrote:
> > I have completed adding Var.varlevelsup, and have added code to the
> > parser to properly set the field. It will allow correlated references
> > in the WHERE clause, but not in the target list.
>
> select i2.ip1, i1.ip4 from nameip i1 where ip1 = (select ip1 from nameip
> i2);
> 522: Table (i2) not selected in query.
> select i1.ip4 from nameip i1 where ip1 = (select i1.ip1 from nameip i2);
> 284: A subquery has returned not exactly one row.
> select i1.ip4 from nameip i1 where ip1 = (select i1.ip1 from nameip i2
> where name='zeus');
> 2 row(s) retrieved.
>
> Informix allows correlated references in the target list. It also allows
> subselects in the target list as in:
> select i1.ip4, (select i1.ip1 from nameip i2) from nameip i1;
> 284: A subquery has returned not exactly one row.
> select i1.ip4, (select i1.ip1 from nameip i2 where name='zeus') from
> nameip i1;
> 2 row(s) retrieved.
>
> Is this what you were looking for ?
>
> Andreas
>
>
Yes, I know other engines support subqueries and references in the
target list. I want to know if we are going to do that for 6.3.
Personally, I have never seen much use for it.
--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-01-21 15:18:29 | Re: [HACKERS] Re: subselects |
Previous Message | Bruce Momjian | 1998-01-21 15:05:17 | Re: [HACKERS] Re: locking |