Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
| От | Oliver Jowett |
|---|---|
| Тема | Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef |
| Дата | |
| Msg-id | 49B5E208.1080205@opencloud.com обсуждение исходный текст |
| Ответ на | Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef
|
| Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: