errors while restoring data.

From: Pritesh Shah <pritesh(dot)krish(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: errors while restoring data.
Date: 2005-02-03 22:20:21
Message-ID: de6ea2a70502031420660017ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

I'm trying to restore some databases from the plain text format dumps.
To restore I'm using:

psql -e -f nmayande.sql template1

I captured a small part while restoring the database which has an error,

CREATE OPERATOR >= (
PROCEDURE = daterange_greater_than_equals,
LEFTARG = daterange,
RIGHTARG = daterange,
NEGATOR = <,
RESTRICT = scalargtsel,
JOIN = scalargtjoinsel
);
psql:/var/tmp/backup/pgsql/20050202/nmayande.sql:1272: ERROR:
function daterange_greater_than_equals(daterange, daterange) does not
exist

These are some of the lines from the *.sql plain text dump file:

......
......

CREATE OPERATOR >= (
PROCEDURE = daterange_greater_than_equals,
LEFTARG = daterange,
RIGHTARG = daterange,
NEGATOR = <,
RESTRICT = scalargtsel,
JOIN = scalargtjoinsel
);

.......
.......

CREATE FUNCTION daterange_greater_than_equals(daterange,
daterange)RETURNS boolean
AS '$libdir/daterange.so', 'daterange_greater_than_equals'
LANGUAGE c;

.......
.......

I know that the CREATE FUNCTION part should come before using it in
CREATE OPERATOR. If it was one or two databases i would have edited
the plain text dump file by hand appropriately. But the problem is
this error spreads to lot of other database's plain text dump files
that i'm trying to restore. Please help me out so that i do not have
to do all this editing manually.

Thanks,
Pritesh

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-02-03 22:32:11 Re: Indexed leading substring searches - worked, now doesn't
Previous Message Wes 2005-02-03 22:14:23 Re: Indexed leading substring searches - worked, now