Re: Putting an aggregate value in an UPDATE statement...

From: Leif Biberg Kristensen <leif(at)solumslekt(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Putting an aggregate value in an UPDATE statement...
Date: 2010-06-01 21:43:32
Message-ID: 201006012343.32625.leif@solumslekt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michelle Konzack 2010-06-02 00:05:51 Re: Invitation to connect on LinkedIn
Previous Message Tom Lane 2010-06-01 21:34:39 Re: Putting an aggregate value in an UPDATE statement...