pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedPG 8.2.7, ECPG & Composite types..
2+ messages / 2 participants
[nested] [flat]
* PG 8.2.7, ECPG & Composite types..
@ 2008-05-01 00:11 List User <pglists@boscorama.com>
2008-05-13 10:07 ` Re: PG 8.2.7, ECPG & Composite types.. Michael Meskes <meskes@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: List User @ 2008-05-01 00:11 UTC (permalink / raw)
To: pgsql-interfaces
Hey folks,
Running PG 8.2.7 and we have decided to use composite types. However,
we are coming up against an issue with ECPG when trying to insert data
into tables using composite types. It's almost like ECPG doesn't allow
composite types. We are novices in this regard so please be gentle. :-)
Here's something really basic that we can get working in psql but not in
ECPG:
create type C_AMT as (
amt float8,
iso integer
);
create table items (
itemNum serial8 primary key,
name varchar(127),
price C_AMT,
stock integer
);
and in ECPG we have tried various things which either end up with a
mismatch between column count & value count; or generate an error
where the values for the embedded composite type have been melded
together as a text string and telling us that the resulting string
is an invalid floating point value. Following is an example of the
latter error:
exec sql insert into items ( name, price.amt, price.iso, stock )
values ( 'Test Item', 99.2, 1, 101 );
Similarly,
exec sql insert into items ( name, price, stock )
values ( 'Test Item', ( 99.2, 1 ), 101 );
Are we chasing a dream or just misguided?
Any help would be greatly appreciated.
Fred.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PG 8.2.7, ECPG & Composite types..
2008-05-01 00:11 PG 8.2.7, ECPG & Composite types.. List User <pglists@boscorama.com>
@ 2008-05-13 10:07 ` Michael Meskes <meskes@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meskes @ 2008-05-13 10:07 UTC (permalink / raw)
To: List User <pglists@boscorama.com>; +Cc: pgsql-interfaces
On Wed, Apr 30, 2008 at 05:11:52PM -0700, List User wrote:
> and in ECPG we have tried various things which either end up with a
> mismatch between column count & value count; or generate an error
> where the values for the embedded composite type have been melded
> together as a text string and telling us that the resulting string
> is an invalid floating point value. Following is an example of the
> latter error:
>
> exec sql insert into items ( name, price.amt, price.iso, stock )
> values ( 'Test Item', 99.2, 1, 101 );
It says this has an invalid floating point?
Could you produce a small test case so we can work on the same example?
Also could you enable logging and post the logs?
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-05-13 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-05-01 00:11 PG 8.2.7, ECPG & Composite types.. List User <pglists@boscorama.com>
2008-05-13 10:07 ` Michael Meskes <meskes@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox