Re: wrong query result

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: josep porres <jmporres(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: wrong query result
Date: 2008-04-09 08:39:06
Message-ID: 20080409083906.GB31352@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2008-04-09 08:58:51 Re: select statement fails
Previous Message Richard Huxton 2008-04-09 08:32:51 Re: wrong query result