Thread: CAST issue/ecpg

CAST issue/ecpg

From
Adriaan Joubert
Date:
Hi,
I've hit a slightly annoying issue with casts and inidicators. Due to
problems using constant INT8's in queries (no <= for float and int8), I
put a cast around all INT8 values. This gives me e.g.
       EXEC SQL INSERT INTO stats           (stats_id, obj_id, stats_time, stats_val, stats_par,
snap_time)       VALUES           (:stats_id, :obj_id, CAST (:stats_time AS BIGINT ),
:stats_val,            :stats_par, CAST (:snap_time AS BIGINT ) :i_snap_time);

ecpg does not like a CAST with an indicator after it, and dies with a
parse error. Without an inidicator variable it seems happy.

Adriaan