Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 11B88633ACF for ; Sun, 21 Jun 2009 21:27:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04375-01 for ; Sun, 21 Jun 2009 21:27:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mail.postgresql.org (Postfix) with ESMTP id 0B45F632BDD for ; Sun, 21 Jun 2009 21:27:13 -0300 (ADT) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MIXNO-0002Ub-UT for pgsql-jdbc@postgresql.org; Sun, 21 Jun 2009 17:27:10 -0700 Message-ID: <24140292.post@talk.nabble.com> Date: Sun, 21 Jun 2009 17:27:10 -0700 (PDT) From: BlackMage To: pgsql-jdbc@postgresql.org Subject: Re: Inserting Information in PostgreSQL interval In-Reply-To: <24139349.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: dsd7872@uncw.edu References: <24139349.post@talk.nabble.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/78 X-Sequence-Number: 19742 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.