CAST issue/ecpg

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: CAST issue/ecpg
Date: 2001-06-18 08:06:40
Message-ID: 3B2DB690.A646A3B1@albourne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message Caroline 2001-06-18 08:50:01 database encryption
Previous Message Josh Berkus 2001-06-18 05:49:26 Re: casts and conversions