Error while restoring database - Mailing list pgsql-hackers

From Johann Zuschlag
Subject Error while restoring database
Date
Msg-id E15uiHj-0007aB-00@mrelay00.kundenserver.de
Whole thread Raw
Responses Re: Error while restoring database
List pgsql-hackers
Hi,

Version 7.1.3, Linux 2.2.18

Following procedure:

1. pg_dump dbname > outfile
Everything is fine.

2. Recreating the database on another system (same Versions)
psql dbname < infile

I get once:
ERROR:  parser: parse error at or near ","
The rest works fine.

Debug -d2 shows that recreating an operator fails. There was never a problem
creating this operator before and it worked fine. It just fails during restore. It seem
the function numeric_neq, which is created later (after the second operator) is missing.
So pg_dump doesn't seem to dump the functions before the operators.

<snip>
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: CREATE FUNCTION "numeric_eq" (numeric,double precision) RETURNS b
DEBUG:  ProcessUtility: CREATE FUNCTION "numeric_eq" (numeric,double precision)
DEBUG:  query:  select $1 = $2::numeric;
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: CREATE OPERATOR <> (PROCEDURE = numeric_neq ,       LEFTARG = numeric ,       RIGHTARG = double
precision,       COMMUTATOR = <> ,       NEGATOR =  ,       RESTRICT = eqsel ,       JOIN = eqjoinsel );
 
ERROR:  parser: parse error at or near ","
DEBUG:  AbortCurrentTransaction
DEBUG:  StartTransactionCommand
DEBUG:  query: CREATE OPERATOR = (PROCEDURE = numeric_eq ,
<snip> 

It's not real problem for me. I think it happened while
playing with pgadmin, changing a function call in
an operator. But still, shouldn't pg_dump look after it?
Any ideas how to fix this? 

regards

Johann Zuschlag
zuschlag@online.de










pgsql-hackers by date:

Previous
From: Bill Studenmund
Date:
Subject: Re: schema support, was Package support for Postgres
Next
From: Thomas Lockhart
Date:
Subject: Re: Platform dependency in timestamp parsing