Re: pg_dump error
От | Tom Lane |
---|---|
Тема | Re: pg_dump error |
Дата | |
Msg-id | 23956.987523065@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | pg_dump error ("mike" <matrix@quadrent.net>) |
Список | pgsql-general |
"mike" <matrix@quadrent.net> writes: > dumpSequence(pilgram_en_id_seq): different sequence name returned by SELECT= > : pilgram_cross_id_seq > I'm not sure what this means, and I have no idea how to corect it. Looking at the source code, it would seem that pg_dump is unhappy because "SELECT sequence_name FROM pilgram_en_id_seq" returned "pilgram_cross_id_seq" instead of the expected "pilgram_en_id_seq". I'm not sure why exactly pg_dump is bothering to make such a cross-check, but probably the more interesting question is how the sequence got that way. Did you rename it at some point? I find that "ALTER TABLE RENAME" will work without complaint on a sequence. Seems we should either (a) prohibit renaming a sequence; (b) improve ALTER TABLE RENAME to know about changing the sequence_name field as well; (c) remove this cross-check from pg_dump; and/or (d) remove the sequence_name field from sequences entirely. (c) looks like the path of least resistance. I don't like (d) because of the risk of breaking existing application code that might look at the contents of sequences. Comments? regards, tom lane
В списке pgsql-general по дате отправления: