pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: BlackMage <dsd7872@uncw.edu>
To: pgsql-jdbc@postgresql.org
Subject: Re: Inserting Information in PostgreSQL interval
Date: Sun, 21 Jun 2009 17:27:10 -0700 (PDT)
Message-ID: <24140292.post@talk.nabble.com> (raw)
In-Reply-To: <24139349.post@talk.nabble.com>
References: <24139349.post@talk.nabble.com>


Hey, that worked!

Thanks a lot.

BlackMage wrote:
> 
> Hey,
> 
> I am having trouble entering intervals into a PostgreSQL inverval field.
> Currently I using prepared statements that look like this:
> 
> {code}
> 
> PreparedStatement query = conn.prepareStatement("INSERT............");
> query.setObject(1, "{28.1, 29.2}");
> query.setObject(2, "{1:23, 1:24}");
> query.execute();
> {code}
> 
> And when I execute the code I get this error:
> 
> org.postgresql.util.PSQLException: ERROR: column "field_1" is of type
> interval[] but expression is of type character varying
> 
> 
> So is there another way of entering an array of intervals into a
> postgresql database using prepared statement? What am I doing wrong?
> 
> 

-- 
View this message in context: http://www.nabble.com/Inserting-Information-in-PostgreSQL-interval-tp24139349p24140292.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.




view thread (3+ messages)

Message-ID: <24140292.post@talk.nabble.com>
Permalink:  ../24140292.post@talk.nabble.com/
Also on:    postgresql.org/message-id/24140292.post@talk.nabble.com

 · 

reply

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: dsd7872@uncw.edu
  Subject: Re: Inserting Information in PostgreSQL interval
  In-Reply-To: <24140292.post@talk.nabble.com>
  References: <24139349.post@talk.nabble.com> <24140292.post@talk.nabble.com>

* 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