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

From: Stefan Armbruster <sarmbruster(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: migrating data from 7.3.x down to 7.2.x
Date: 2003-07-15 07:51:40
Message-ID: 1058255500.2128.9.camel@emperor.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Am Mon, 2003-07-14 um 21.01 schrieb Ian Barwick:
> 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?
Yes, I'm developing with 7.3.2, production is 7.2.2.

>
> > 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.

In other words: a short script with some cut & replace operations could
do the job? Is there a specific document describing all the DDL changes
from 7.2 to 7.3?ßß

Stefan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2003-07-15 08:29:48 Re: Are you frustrated with PostgreSQL
Previous Message Együd Csaba 2003-07-15 04:42:36 Re: drop function all - ?