X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC3C0539D8 for ; Thu, 21 Apr 2005 17:03:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84887-04 for ; Thu, 21 Apr 2005 20:02:49 +0000 (GMT) Received: from mx.vitrado.de (mx.vitrado.de [194.97.5.172]) by svr1.postgresql.org (Postfix) with ESMTP id C90D553921 for ; Thu, 21 Apr 2005 17:02:46 -0300 (ADT) Received: from j92b8.j.pppool.de ([85.74.146.184] helo=client.parano.ia) by mx.vitrado.de with esmtpa (Exim 4.50 and XAMS pre-0.0.16) id 1DOhsr-0007af-Uy; Thu, 21 Apr 2005 22:02:46 +0200 From: Oliver Siegmar Organization: vitrado GmbH To: Kris Jurka Subject: Re: Interval support for Postgres Date: Thu, 21 Apr 2005 22:02:32 +0200 User-Agent: KMail/1.7.2 Cc: pgsql-jdbc@postgresql.org References: <200504211107.01028.o.siegmar@vitrado.de> <200504212137.23827.o.siegmar@vitrado.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504212202.32460.o.siegmar@vitrado.de> X-vitrado-MailScanner-Information: Please contact the ISP for more information X-vitrado-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-MailScanner-From: o.siegmar@vitrado.de X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/116 X-Sequence-Number: 12723 On Thursday 21 April 2005 21:43, Kris Jurka wrote: > On Thu, 21 Apr 2005, Oliver Siegmar wrote: > > On Thursday 21 April 2005 20:32, Kris Jurka wrote: > > > On Thu, 21 Apr 2005, Oliver Siegmar wrote: > > > > here's a patch that adds functionality to the PGInterval class. I'd > > > > be happy to see this in upstream. > > > > > > You cannot use regex code in this class because it must compile with > > > 1.2 and 1.3 JDKs. > > > > Can it be placed in the JDBC3 package, then? This requires JDK 1.4 > > anyway, right? > > It could, but I'd be against it. Having a different PGInterval behavior > for JDBC2 and JDBC3 builds would be rather odd. While regex may be > convenient here it certainly isn't essential. If you want to get this in > I'd recommend rewriting to do the parsing manually. Well, actually there is almost no implementation at all. Parsing strings in Java in 2005 is a royal pain in the ass - doing that for 0.x% users suck even more. Let's assume I'd write a JDBC2 version with old-school string parsing - would you apply it to upstream, or are there any other show stoppers? Oliver