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

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: jzelez(at)gmail(dot)com
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14935: Cast function shortcut gives an error
Date: 2017-11-29 09:52:00
Message-ID: CAL9smLAt8rmHb32Dn7cxuEhwe74=+CzYsbWC8W9yY3ueKbQnLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Nov 29, 2017 at 10:27 AM, <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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jurica Železnjak 2017-11-29 10:03:46 Re: BUG #14935: Cast function shortcut gives an error
Previous Message jzelez 2017-11-29 08:27:05 BUG #14935: Cast function shortcut gives an error