Re: UPDATE using query; per-row function calling problem

From: David Johnston <polobo(at)yahoo(dot)com>
To: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: UPDATE using query; per-row function calling problem
Date: 2011-09-02 13:16:06
Message-ID: D24E1FBC-7C5D-4455-9E69-46EB35EC4D61@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>
> In my "-1" example, am I right in assuming that I created a correlated
> subquery rather than an correlated one? I'm confused about the
> difference.
>
>

Correlated: has a where clause that references the outer query
Un-correlated: not correlated

Because of the where clause a correlated sub-query will return a different record for each row whereas an un-correlated sub-query will return the same record for all rows since the where clause (if any) is constant.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pasman pasmański 2011-09-02 14:48:34 Re: UPDATE using query; per-row function calling problem
Previous Message Antonio Vieiro 2011-09-02 10:49:10 Re: Memory leak somewhere at PQconnectdb?