Using IN with subselect

From: Dave Smith <dave(dot)smith(at)candata(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Using IN with subselect
Date: 2004-11-25 16:49:06
Message-ID: 1101401346.7960.36.camel@playpen.candata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a query with an in subquery like

where x in (select x from y);

Now the subquery is not related to the outer query so it always returns
the same set. Is this subselect executed each time or just once? If it
is executed each time, if I create a function would that then be only
executed once?

--
Dave Smith
CANdata Systems Ltd
416-493-9020

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-11-25 16:57:26 Re: why use SCHEMA? any real-world examples?
Previous Message ON.KG 2004-11-25 16:42:21 table name in pl/pgsql