Error at end of pg_dump output (setting sequence number?)
Hi all.
I just did a pg_dump (with the -d param) of one of my databases in
order to move it to a new server. When I put it into the new server,
all the tables were created just fine, and all of the data was inserted
just fine, then I got an error at the very end which read:
ERROR: parser: parse error at or near "("
The line that seems to have given that error was at the very end of the
pg_dump output, and it was:
SELECT pg_catalog.setval ('order_number_seq', 10039784, true);
That does seem to me to be a strange select statement. Anyone know what
the problem is? Is this a bug in pg_dump? (Was that supposed to have
been an INSERT statement?)
Thanks
--Dan
Dan Delaney <Dionysos@mail.Dionysia.org> writes:
I just did a pg_dump (with the -d param) of one of my databases in
order to move it to a new server. When I put it into the new server,
all the tables were created just fine, and all of the data was inserted
just fine, then I got an error at the very end which read:
ERROR: parser: parse error at or near "("
The line that seems to have given that error was at the very end of the
pg_dump output, and it was:
SELECT pg_catalog.setval ('order_number_seq', 10039784, true);
That command is fine ... to a 7.3 server. I'm betting you tried to
restore a 7.3 dump into a pre-7.3 server.
regards, tom lane
On Wednesday, January 22, 2003, at 12:56 AM, Tom Lane wrote:
That command is fine ... to a 7.3 server. I'm betting you tried to
restore a 7.3 dump into a pre-7.3 server.
DOH!!! That was it. I thought the other server had 7.3, but it turns
out it just has 7.2. It worked out alright though. I just dropped the
sequence and recreated it starting at the number it was suppose to
start at.
Thanks a lot.
--Dan