Re: wrong query result - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: wrong query result
Date
Msg-id 20080409083906.GB31352@svana.org
Whole thread Raw
In response to wrong query result  ("josep porres" <jmporres@gmail.com>)
List pgsql-general
On Wed, Apr 09, 2008 at 10:20:18AM +0200, josep porres wrote:
> At the end I've realized that there is no column named 'clau'. It has
> another name.
> So the subselect query is wrong, if I execute it alone, an error appears

<snip>

> The question is:
> Is it a normal behaviour? Because I think that if the query is wrong,
> wouldn't be better to raise an error?

Google for "correlated subquery". Short answer: It's supposed to work
that way.

Have a nce day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Attachment

pgsql-general by date:

Previous
From: otakarek@post.cz
Date:
Subject: Trouble with foreign key
Next
From: Richard Huxton
Date:
Subject: Re: select statement fails