Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0A452632FAF for ; Tue, 12 May 2009 04:46:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 55202-02 for ; Tue, 12 May 2009 04:45:41 -0300 (ADT) X-Greylist: delayed 00:05:58.584331 by SQLgrey-1.7.6 Received: from aa001msb.fastweb.it (aa001msb.fastweb.it [85.18.95.80]) by mail.postgresql.org (Postfix) with ESMTP id D105B630861 for ; Tue, 12 May 2009 04:44:45 -0300 (ADT) Received: from fluca-laptop.localnet (85.18.239.131) by aa001msb.fastweb.it (8.5.016.6) id 4A01905400E67843 for pgsql-jdbc@postgresql.org; Tue, 12 May 2009 09:39:08 +0200 From: Luca Ferrari To: pgsql-jdbc@postgresql.org Subject: ResultSet internal data type handling Date: Tue, 12 May 2009 09:39:07 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.28-11-generic; KDE/4.2.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905120939.07478.fluca1978@infinito.it> 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: 200905/54 X-Sequence-Number: 19604 Having a look at jdbc2.AsbtractJDBC2ResultSet (the parent of all ResultSets) I discovered that all data received from the server is handled internally as a string (right?) and is converted from the getXXX methods into the appropriate type. This means that you can actually write a getString on a date field obtaining a valida date (and if you are lucky you can do something the opposite). I'm curious to know if this is an implementation choice or a jdbc specification and why the objects are not checked against the table metadata (as the getInternalObject method does). Thanks, Luca