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









Sat, 20 Oct 2001 00:41:11 +0200
"Johann Zuschlag" <zuschlag@online.de>
Error while restoring database
"Johann Zuschlag" <zuschlag@online.de> writes:
> 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 ","

Hmm, so what happened to the NEGATOR link?

You have not given us enough information to understand what, if
anything, needs to be fixed ... do you still have the original
database to look at?

			regards, tom lane

Fri, 19 Oct 2001 23:39:31 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Error while restoring database 