Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EF1BB6326ED for ; Tue, 21 Apr 2009 04:01:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 59676-10 for ; Tue, 21 Apr 2009 04:01:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id F04B563265D for ; Tue, 21 Apr 2009 04:01:48 -0300 (ADT) Received: from deluge.opencloud.co.nz ([192.168.0.16]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Lw9z9-0005va-4g; Tue, 21 Apr 2009 19:01:39 +1200 Message-ID: <49D208CF.3020606@opencloud.com> Date: Wed, 01 Apr 2009 01:13:03 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Kris Jurka CC: "j.random.programmer" , pgsql-jdbc@postgresql.org Subject: Re: Bug with duplicate column names via JDBC MetaData (ORDINAL_POSITION) References: <171323.40102.qm@web31106.mail.mud.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.32 tagged_above=0 required=5 tests=DATE_IN_PAST_96_XX=2.32 X-Spam-Level: ** X-Archive-Number: 200904/75 X-Sequence-Number: 19522 Kris Jurka wrote: > > > On Mon, 20 Apr 2009, j.random.programmer wrote: > >> While using JDBC MetaData for my O/R tool, I've come across this >> bug recently; >> >> When getting JDBC Meta data, the column numbers for the >> following 2 columns, via ('ORDINAL_POSITION') of the 2 >> columns are IDENTICAL: >> >> [1] >> colname=dictname, colnum=1, sqltype=12, typename=name, >> colsize=2147483647, nullable=false, isAutoIncrement=false, >> remarks=null, hasRemarks=false, isPK=false, fkdata=null] >> --and-- >> [2] >> colname=dict_name, colnum=1, sqltype=12, typename=text, >> colsize=2147483647, nullable=false, isAutoIncrement=false, >> remarks=null, hasRemarks=false, isPK=false, fkdata=null] >> ------------------------------------------------------------- >> >> Note, "dict_name" does not show up via the \d pg_ts_dict >> output above but this, possibly extraneous column, does >> show up in the JDBC MetaData. > > Without showing the calls you're making it's not completely clear what > your ORM tool is doing. The attached test case of just getColumns has > no problems. I wonder if this is a problem with dropped columns again. (mr. random programmer, please tell us your JDBC driver version and postgresql server version at least!) -O