CAST issue/ecpg - Mailing list pgsql-sql

From Adriaan Joubert
Subject CAST issue/ecpg
Date
Msg-id 3B2DB690.A646A3B1@albourne.com
Whole thread Raw
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Sergey E. Volkov"
Date:
Subject: Re: Passing cursor between functions in embedded SQL
Next
From: mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström)
Date:
Subject: How to check if a table exists from functions.