Re: smallint out of range EXECUTEing prepared statement

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: smallint out of range EXECUTEing prepared statement
Date: 2017-01-18 22:25:58
Message-ID: CAKFQuwbuaX8M-9v2MzkcuZcF6MVCW_Ym2tnxkMa7nyY=3YNX=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 18, 2017 at 3:15 PM, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:

> Is this expected behavior ?

​​
>
> ts=# SELECT * FROM t WHERE site_id=32768 LIMIT 1;
> (0 rows)
>
> ts=# PREPARE x AS SELECT * FROM t WHERE site_id=$1 LIMIT 1;
> PREPARE
> ts=# EXECUTE x(32768);
> ERROR: smallint out of range
>

​​Probably. If you show the definition of "t", or at least "t.site_id",
that can be confirmed.

And, IMO, this question is more in line with the purpose of the -general
list.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-01-18 22:27:40 Re: Patch to implement pg_current_logfile() function
Previous Message Justin Pryzby 2017-01-18 22:15:30 smallint out of range EXECUTEing prepared statement