> "Justin" == Justin Pryzby writes:
Justin> Is this expected behavior ?
Justin> ts=# SELECT * FROM t WHERE site_id=32768 LIMIT 1;
Justin> (0 rows)
Justin> ts=# PREPARE x AS SELECT * FROM t WHERE site_id=$1 LIMIT 1;
Justin> PREPARE
Justin> ts=# EXECUTE x(32768);
Justin> ERROR: smalli
On Wed, Jan 18, 2017 at 3:15 PM, Justin Pryzby 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
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
ts=# PREPARE y AS SELECT * FROM t WHERE site_id::int=$1 LIMIT 1;
PREPARE
ts=# EXECUTE y(