pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: j.random.programmer <javadesigner@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in metadata.getColumns()/ORDINAL_POSITION
Date: Sat, 17 Feb 2007 15:01:45 -0500
Message-ID: <23750.1171742505@sss.pgh.pa.us> (raw)
In-Reply-To: <616596.40210.qm@web32005.mail.mud.yahoo.com>
References: <616596.40210.qm@web32005.mail.mud.yahoo.com>

"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 :-(

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <23750.1171742505@sss.pgh.pa.us>
Permalink:  ../23750.1171742505@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23750.1171742505@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, javadesigner@yahoo.com
  Subject: Re: Bug in metadata.getColumns()/ORDINAL_POSITION
  In-Reply-To: <23750.1171742505@sss.pgh.pa.us>
  References: <616596.40210.qm@web32005.mail.mud.yahoo.com> <23750.1171742505@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox