what standard say ...

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: hackers(at)postgresql(dot)org
Subject: what standard say ...
Date: 1998-02-06 04:35:05
Message-ID: 34DA92F9.F03D6CB3@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

vac=> \d test

Table = test
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| x | int4 | 4 |
| y | int4 | 4 |
+----------------------------------+----------------------------------+-------+
vac=> select count(*) from test where exists (select t1.y from test t1 where t1.y = x);
^
Is this correlated subquery or not ?
(Note, that I don't use x with t1. prefix here)
With current parser this works as un-correlated subquery...
Is this Ok and I have to re-write query as

vac=> select count(*) from test t2 where exists
^^
(select t1.y from test t1 where t1.y = t2.x);
^^^
to get correlated one ?

Vadim

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Billy G. Allie 1998-02-06 04:47:38 The new 'isinf.c' function in port.
Previous Message Thomas G. Lockhart 1998-02-06 02:53:37 Re: [HACKERS] create function bug?