From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | pg_dump and sequences - RFC |
Date: | 2000-09-28 09:09:45 |
Message-ID: | 3.0.5.32.20000928190945.03896100@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | devik | 2000-09-28 12:01:14 | Re: pgsql is 75 times faster with my new index scan |
Previous Message | Peter Eisentraut | 2000-09-28 08:52:38 | Re: The Data Base System is in recovery mode |