Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
Date
Msg-id 20795.1236655715@sss.pgh.pa.us
Whole thread Raw
In response to Renaming sequence auto generated by SERIAL type don't update pg_attrdef  ("Dickson S. Guedes" <listas@guedesoft.net>)
Responses Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef  (Oliver Jowett <oliver@opencloud.com>)
Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef  ("Dickson S. Guedes" <listas@guedesoft.net>)
List pgsql-jdbc
"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.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: "Dickson S. Guedes"
Date:
Subject: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
Next
From: Scott Carey
Date:
Subject: Re: [PERFORM] Query much slower when run from postgres function