Re: BUG #4582: Renaming sequences and default value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4582: Renaming sequences and default value
Дата
Msg-id 8160.1229367122@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4582: Renaming sequences and default value  ("Jan-Peter Seifert" <jan-peter.seifert@gmx.de>)
Ответы 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:
> there's a problem with renaming sequences in our databases.

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)

This specifically says that 'public.t2_id_seq' is a string (text) constant,
which is not going to change in response to anything.  If you would
like it to track renamings of the sequence then it needs to be a
regclass constant:

    id integer NOT NULL DEFAULT nextval('public.t2_id_seq'::regclass)

Also, neither of these forms will by itself establish an OWNED BY
relationship --- you'll need a separate ALTER SEQUENCE OWNED BY
command if you want that.

If that doesn't help, you'll need to be a lot more specific about the
actions you took.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Scott Carey
Дата:
Сообщение: Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #4027: backslash escaping not disabled in plpgsql