From: Oliver Jowett <oliver@opencloud.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dickson S. Guedes <listas@guedesoft.net>
Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
Date: Tue, 10 Mar 2009 16:44:08 +1300
Message-ID: <49B5E208.1080205@opencloud.com> (raw)
In-Reply-To: <20795.1236655715@sss.pgh.pa.us>
References: <1236650119.6410.73.camel@guedes-laptop>
<20795.1236655715@sss.pgh.pa.us>
Tom Lane wrote:
> "Dickson S. Guedes" <listas@guedesoft.net> writes:
>> Shouldn't the JDBC driver use another query instead that, since docs
>> alerts[1] to this problem?
>
> What's the default value being used for anyway? If it's to determine
> which sequence is associated with the column, I think you shouldn't be
> looking at pg_attrdef at all; you should look for a dependent sequence
> via pg_depend. But maybe it's only being used to check if the column
> has a default, in which case the possible staleness of the string
> value isn't important.
I'm guessing that particular query is from
DatabaseMetaData.getColumns(), which returns amongst other things:
13. COLUMN_DEF String => default value (may be null)
(yes, that's the sum total of the JDBC documentation about that piece of
metadata)
-O
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: oliver@opencloud.com, tgl@sss.pgh.pa.us, listas@guedesoft.net
Subject: Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
In-Reply-To: <49B5E208.1080205@opencloud.com>
References: <1236650119.6410.73.camel@guedes-laptop> <20795.1236655715@sss.pgh.pa.us> <49B5E208.1080205@opencloud.com>
* 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