Re: Default value of serial fields changes after restore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Default value of serial fields changes after restore
Дата
Msg-id 11202.1342725188@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Default value of serial fields changes after restore  (Luiz Damim <luizvd@gmail.com>)
Ответы Re: Default value of serial fields changes after restore  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Luiz Damim <luizvd@gmail.com> writes:
> Today I found a strange behavior after restoring a PostgreSQL database: the
> schema of all serialfields default values are trimmed out.

I don't think anything's being "trimmed out".  It's the normal behavior
of regclass literals to not print the schema if the table (or sequence
in this case) is visible in the current search_path.

> After restore, default_value changes to
> nextval('testtable_id_seq'::regclass) and INSERT's start to fail as the
> sequence can´t be found on it's schema.

This claim is utter nonsense.  If you are having a problem it's not due
to the way regclass literals print.  Please show a complete example of
something failing.

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Trouble with NEW
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Default value of serial fields changes after restore