Re: BUG #4582: Renaming sequences and default value
От | Tom Lane |
---|---|
Тема | Re: BUG #4582: Renaming sequences and default value |
Дата | |
Msg-id | 18376.1229475331@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #4582: Renaming sequences and default value (Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>) |
Список | pgsql-bugs |
Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de> writes: > Tom Lane wrote: >> I don't think there's really a problem here. You've apparently got some >> obsolete syntax in your CREATE commands: >> >>> id integer NOT NULL DEFAULT nextval(('public.t2_id_seq'::text)::regclass) > ... But then I saw the difference in nextval syntax > etc.. The update tool in question uses the obsolete syntax. Has this > text constant thing been official syntax for some time? I wonder why the > person implementing this syntax into the tool did it in the first place. It might not be entirely the tool's fault. If you had something like DEFAULT nextval('public.t2_id_seq') in an old version of PG (pre 8.1 I think) then the business with text is actually the most precise, if not the most useful, translation of that --- pre 8.1 didn't have any way to track renamings of a serial sequence and so this structure mimics its semantics. So you might have got to this state via a dump and reload. Or maybe whoever wrote the tool copied what he saw in an old dump, without realizing that it wasn't very desirable. regards, tom lane
В списке pgsql-bugs по дате отправления: