From: Christian Kindler <christian.kindler@gmx.net>
To: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: prepared statement using postgres array
Date: Fri, 30 Nov 2007 18:43:05 +0100
Message-ID: <20071130174305.288040@gmx.net> (raw)
In-Reply-To: <77FD84BA-A86E-4037-9735-115CF1A077B4@fastcrypt.com>
References: <20071130140744.141200@gmx.net>
<77FD84BA-A86E-4037-9735-115CF1A077B4@fastcrypt.com>
Hi Dave
> you have to implement the java.sql.Array
hmmm ... i have tried to find a sample implementation of the interface, but no success.
I am sure this is a ugly solution but I figures out a workaround:
INSERT INTO Quote(fi_id, market_id, "date", "time",
"open", high, low, "close", vol, oi,
bid, bidvol, ask, askvol,
last,
sysstatus,
buyers, buyersvol, sellers, sellersvol,
additional)
VALUES(?, ?, ?, ?,
?, ?, ?, ?, ?, ?,
?, ?, ?, ?,
?,
?,
(select string_to_array(?, ',')::float[]),
(select string_to_array(?, ',')::float[]),
(select string_to_array(?, ',')::float[]),
(select string_to_array(?, ',')::float[]),
(select string_to_array(?, ',')::float[])
);
... as is said not pretty but it works for the moment ...
Thanks!
Christian
PS But it still will be cool if anybody could provide me a sample snipped implementing java.sql.Array
--
cu
Chris
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: christian.kindler@gmx.net, pg@fastcrypt.com
Subject: Re: prepared statement using postgres array
In-Reply-To: <20071130174305.288040@gmx.net>
References: <20071130140744.141200@gmx.net> <77FD84BA-A86E-4037-9735-115CF1A077B4@fastcrypt.com> <20071130174305.288040@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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