Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AB1DE2E005C for ; Sat, 8 Dec 2007 10:36:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 14692-03 for ; Sat, 8 Dec 2007 10:36:02 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.186]) by postgresql.org (Postfix) with ESMTP id 50FC52E004F for ; Sat, 8 Dec 2007 10:36:01 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id l15so1133216rvb for ; Sat, 08 Dec 2007 06:36:00 -0800 (PST) Received: by 10.141.18.14 with SMTP id v14mr3258317rvi.1197124560223; Sat, 08 Dec 2007 06:36:00 -0800 (PST) Received: by 10.141.98.15 with HTTP; Sat, 8 Dec 2007 06:36:00 -0800 (PST) Message-ID: <6a1128300712080636k6df89deje6ce4035b58f90b0@mail.gmail.com> Date: Sat, 8 Dec 2007 14:36:00 +0000 From: "Roy Smith" To: pgsql-jdbc@postgresql.org Subject: ResultsetMetaData.getColumnName bug? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2007_19281730.1197124560225" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200712/64 X-Sequence-Number: 17919 ------=_Part_2007_19281730.1197124560225 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It looks like getColumnName() is incorrectly returning the column label. They are normally the same, but I have a query "select add as Address" and resultsetmetadata.getColumnName(1) is retuning "Address" instead of "add". In the source code of AbstractJdbc2ResultsetMetadata I see this ... public String getColumnName(int column) throws SQLException { return getColumnLabel(column); } best Roy ------=_Part_2007_19281730.1197124560225 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It looks like getColumnName() is incorrectly returning the column label.
They are normally the same, but I have a query "select add as Address" and resultsetmetadata.getColumnName(1) is retuning "Address" instead of "add".

In the source code of AbstractJdbc2ResultsetMetadata I see this ...

   public String getColumnName(int column) throws SQLException
    {
        return getColumnLabel(column);
    }



best
Roy

------=_Part_2007_19281730.1197124560225--