Re: [HACKERS] smallint out of range EXECUTEing prepared statement - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [HACKERS] smallint out of range EXECUTEing prepared statement
Date
Msg-id CAKFQuwbuaX8M-9v2MzkcuZcF6MVCW_Ym2tnxkMa7nyY=3YNX=Q@mail.gmail.com
Whole thread Raw
List pgsql-hackers
On Wed, Jan 18, 2017 at 3:15 PM, Justin Pryzby <pryzby@telsasoft.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.

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: [HACKERS] smallint out of range EXECUTEing prepared statement
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Patch to implement pg_current_logfile() function