pg_dump and sequences - RFC
От | Philip Warner |
---|---|
Тема | pg_dump and sequences - RFC |
Дата | |
Msg-id | 3.0.5.32.20000928190945.03896100@mail.rhyme.com.au обсуждение исходный текст |
Ответы |
Re: pg_dump and sequences - RFC
|
Список | pgsql-hackers |
It recently came to my attention that pg_dump dumps 'CREATE SEQUENCE' and 'SELECT NEXTVAL' commands for both data-only and schema-only output. This results in problems for users who do the two in separate steps, and seems a little odd. Also, I'd be interested to know what the purpose of 'SELECT NEXTVAL' is? My inclinations is do do the following: - Issue 'CREATE SEQUENCE...Initial Value 1...' in OID order - Issue 'SELECT SETVAL...' at end of data load. This means that a schema-only restore will hgave all sequences set up with initial value = 1, and a data-only restore will have sequences set 'correctly'. Does this sound reasonable? ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
В списке pgsql-hackers по дате отправления: