Re: Bug in metadata.getColumns()/ORDINAL_POSITION

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in metadata.getColumns()/ORDINAL_POSITION
Date: 2007-02-17 20:01:45
Message-ID: 23750.1171742505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"j.random.programmer" <javadesigner(at)yahoo(dot)com> writes:
> This is a quick followup to my earlier post. Upon
> further
> testing, this bug reliably and reproducably happens
> when an "alter table" command is used on the database.

So the problem is that it's returning pg_attribute.attnum without any
consideration for earlier dropped columns. Not sure how expensive it'd
be to get the current logical column number, though --- at a minimum one
would have to select all the table's pg_attribute rows :-(

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message santosh dwivedi 2007-02-17 20:45:16 unsubscribe
Previous Message j.random.programmer 2007-02-17 19:17:41 Re: Bug in metadata.getColumns()/ORDINAL_POSITION