Re: migrating data from 7.3.x down to 7.2.x

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Stefan Armbruster <sarmbruster(at)web(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: migrating data from 7.3.x down to 7.2.x
Date: 2003-07-14 19:01:15
Message-ID: 200307142101.16016.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 14 July 2003 16:04, Stefan Armbruster wrote:
> Hi,
>
> I tried to migrate a database from 7.3.2 down to PostgreSQL 7.2.2

Any particular reason?

> and
> got some trouble. The database contains various plpgsql triggers. Here
> what I tried:
(...)
> It gives me some errors, see below.
>
> My next step was to connect pg_dump remotely from the 7.2.2 box to dump
> the 7.3.2 database (with -i option). This gave me this error.
> pg_dump: query to obtain list of data types failed: ERROR: Attribute
> "typprtlen" not found

Connecting older utilities to newer backends generally won't work.

> I think, the 7.3.2 dump file format uses some syntax 7.2.2 does not
> understand. Is there a way to force 7.3.2's pg_dump to produce a 7.2.2
> compatible output?

No.

> Or any other suggestions?

If triggers are your only problem it might just be a case of manually tweaking
the trigger function definitions to return OPAQUE instead of TRIGGER, this is
the error here:

> psql:sguru.dmp:24: ERROR: PL handler function plpgsql_call_handler()
> isn't of return type Opaque

> You are now connected as new user sguru.
> psql:sguru.dmp:29: ERROR: parser: parse error at or near "public"
(...)
> SET search_path = public, pg_catalog;

The above line won't work in 7.2.x. The other major problem, at least
in terms of DDL, is CREATE OR REPLACE ..., you will need to remove
the "OR REPLACE" bit.

Ian Barwick
barwick(at)gmx(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2003-07-14 19:58:07 Re: select null + 0 question
Previous Message David Olbersen 2003-07-14 18:53:30 Reverse compatibility