Re: BUG #14935: Cast function shortcut gives an error

From: Jurica Železnjak <jzelez(at)gmail(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14935: Cast function shortcut gives an error
Date: 2017-11-29 10:03:46
Message-ID: 96b6da9f-83f5-4d4b-a844-797d6e97e617@Canary
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ok. Thanks... I guess I should bring attention to this to the Django team where they use it without the parenthesis.

Jurica

> On Wednesday, Nov 29, 2017 at 10:52 AM, Marko Tiikkaja <marko(at)joh(dot)to (mailto:marko(at)joh(dot)to)> wrote:
> On Wed, Nov 29, 2017 at 10:27 AM, <jzelez(at)gmail(dot)com (mailto:jzelez(at)gmail(dot)com)> wrote:
> > In some cases when using the shortcut notation "::" the database gives an
> > error.
> >
> > GOOD:
> > CAST("sensors_sensordata"."data" #>> '{Temperature}' AS DOUBLE PRECISION) AS
> > "temp"
> >
> > ERROR:
> > "sensors_sensordata"."data" #>> '{Temperature}'::DOUBLE PRECISION AS
> > "temp"
>
> The precedence between the two is different. The equivalent would be:
>
> ("sensors_sensordata"."data" #>> '{Temperature}')::DOUBLE PRECISION
>
> In other words, not a bug.
>
>
> .m

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message maxim.boguk 2017-11-29 10:06:49 BUG #14936: Huge backend memory usage during schema dump of database with many views
Previous Message Marko Tiikkaja 2017-11-29 09:52:00 Re: BUG #14935: Cast function shortcut gives an error