X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 00A739DC813 for ; Mon, 23 Jan 2006 13:02:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88662-02 for ; Mon, 23 Jan 2006 13:02:16 -0400 (AST) X-Greylist: whitelisted by SQLgrey- Received: from ms-smtp-02.nyroc.rr.com (ms-smtp-02.nyroc.rr.com [24.24.2.56]) by postgresql.org (Postfix) with ESMTP id E30D39DC804 for ; Mon, 23 Jan 2006 13:02:15 -0400 (AST) Received: from [192.168.1.100] (cpe-72-224-98-82.nycap.res.rr.com [72.224.98.82]) by ms-smtp-02.nyroc.rr.com (8.13.4/8.13.4) with ESMTP id k0NH2E7e019992 for ; Mon, 23 Jan 2006 12:02:15 -0500 (EST) Message-ID: <43D50C19.9040408@vilaj.com> Date: Mon, 23 Jan 2006 12:02:17 -0500 From: Will Szopko Reply-To: dba@vilaj.com Organization: vilaj.com, LLC User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Inserting an Interval Using JDBC Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/102 X-Sequence-Number: 14553 My apologies if there's a simple answer to my problem, but I've looked and looked and can't figure it out. I have just upgraded to the 8.1-404 version of the JDBC driver from a much older version. In the past I had been able load an interval into my database by sending it as a string, as such: String myInterval = "08:00"; // 8 hour interval ... stmt.setString(1, myInterval); Using the new driver I am no longer able to do this and get the following error: column "num_hours" is of type interval but expression is of type text I have looked through the driver source code, but don't see that I could send the value as an "object" or as one of the other time-related types. If someone might be able to point me to a solution to this problem, I'd be most appreciative. Thanks. - Will