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 0A8D19DD567 for ; Fri, 9 Dec 2005 05:41:13 -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 34642-10 for ; Fri, 9 Dec 2005 05:41:14 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 742FC9DCC5D for ; Fri, 9 Dec 2005 05:41:09 -0400 (AST) Received: (qmail invoked by alias); 09 Dec 2005 09:41:11 -0000 Received: from 85-124-6-194.dynamic.xdsl-line.inode.at (EHLO [192.168.1.16]) [85.124.6.194] by mail.gmx.net (mp027) with SMTP; 09 Dec 2005 10:41:11 +0100 X-Authenticated: #1946847 Message-ID: <43995155.5000301@gmx.at> Date: Fri, 09 Dec 2005 10:41:41 +0100 From: Michael Paesold User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Kris Jurka CC: pgsql-jdbc@postgresql.org Subject: Re: Problem with 8.1 driver References: <024401c5f9da$537c29c0$0f01a8c0@zaphod> <00b001c5fa45$123f1a60$0f01a8c0@zaphod> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 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: 200512/46 X-Sequence-Number: 14377 Kris Jurka wrote: > On Tue, 6 Dec 2005, Michael Paesold wrote: > >> Another question that occurred to me is, how should I tell the driver >> to specify a type as "undefined" or "unknown" to the server? >> >> Some random tries that did not work: >> stmt.setObject(2, "1 month", java.sql.Types.OTHER); >> --> Cannot cast an instance of String to type Types.OTHER > > You can use > > stmt.setObject(2, new org.postgresql.util.PGInterval("1 month")); Thanks, that works. Altough I would prefer a way to do this in a standard way (without org.postgresql classes). The real problem here is probably that there is no Types.INTERVAL. What a shame. Do you think it would be reasonable for the driver to implementing > stmt.setObject(2, "1 month", java.sql.Types.OTHER); as sending the parameter as "unknown"? I.e. would a patch implementing this be accepted? Or is Types.OTHER reserved for a different meaning? Best Regards, Michael Paesold