Re: Bug with int2

From: Feng Tian <ftian(at)vitessedata(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug with int2
Date: 2016-02-17 05:11:50
Message-ID: CAFWGqnuCTPbVmFciBGCRc15HQZf3_pNXGrQhUg8hTR5E469W=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ah, thanks!

On Tue, Feb 16, 2016 at 7:54 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

> On Tue, Feb 16, 2016 at 7:27 PM, Feng Tian <ftian(at)vitessedata(dot)com> wrote:
> > I run into the following. Seems this is a bug for -32768, which should
> be
> > a valid smallint value.
>
> This isn't a bug. You see the error only due to operator precedence:
>
> postgres=# select (-32768)::int2;
> int2
> ─────────
> -32,768
> (1 row)
>
> --
> Peter Geoghegan
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2016-02-17 05:14:35 Re: tsearch_extras extension
Previous Message Pavel Stehule 2016-02-17 05:09:43 Re: proposal: PL/Pythonu - function ereport