Re: Putting an aggregate value in an UPDATE statement... - Mailing list pgsql-novice

From Leif Biberg Kristensen
Subject Re: Putting an aggregate value in an UPDATE statement...
Date
Msg-id 201006012343.32625.leif@solumslekt.org
Whole thread Raw
In response to Re: Putting an aggregate value in an UPDATE statement...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Putting an aggregate value in an UPDATE statement...  (John Gage <jsmgage@numericable.fr>)
List pgsql-novice
On Tuesday 1. June 2010 23.34.39 Tom Lane wrote:
> Well, the main point is that the possible ambiguity means that SQL has
> mandated you put parentheses around any sub-select.  However, if you're
> claiming there is no possible ambiguity inside a function call, compare:
>
>     select myfunc((select integer_col from foo where bar = 5+4))
>     select myfunc((select integer_col from foo where bar = 5)+4)
>
> These mean different things, and you couldn't tell 'em apart without
> the inner parentheses.

Right, I get it. Thanks for the explanation.

regards,
--
Leif Biberg Kristensen
http://solumslekt.org/blog/

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Putting an aggregate value in an UPDATE statement...
Next
From: Michelle Konzack
Date:
Subject: Re: Invitation to connect on LinkedIn