Re: Bug in metadata.getColumns()/ORDINAL_POSITION

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Bug in metadata.getColumns()/ORDINAL_POSITION
Дата
Msg-id alpine.BSO.2.00.0912082008230.5801@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Bug in metadata.getColumns()/ORDINAL_POSITION  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc

On Sat, 17 Feb 2007, Tom Lane wrote:

> "j.random.programmer" <javadesigner@yahoo.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 :-(
>

I've fixed this in CVS when running against 8.4 and later servers by using
the row_number window function as was suggested elsewhere:

http://archives.postgresql.org/pgsql-general/2009-11/msg01067.php

Kris Jurka


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Version information inside the driver's jar file
Следующее
От: Craig Ringer
Дата:
Сообщение: Anyone want a couple of listen/notify helper classes?