Thread: dump 7.3 into 7.2?

dump 7.3 into 7.2?

From
Russ Schneider
Date:
I need to transfer a dump from a psql 7.3 database to a 7.2 database.

Is there any way to do this?

--
[ Russ Schneider (a.k.a. Sugapablo)     ]
[ http://www.sugapablo.com <--music     ]
[ http://www.sugapablo.net <--personal  ]
[ sugapablo@12jabber.com   <--jabber IM ]

Re: dump 7.3 into 7.2?

From
Tom Lane
Date:
Russ Schneider <russ@sugapablo.com> writes:
> I need to transfer a dump from a psql 7.3 database to a 7.2 database.
> Is there any way to do this?

You will have to do some manual hacking on the schema declarations,
almost certainly.  I'd recommend dumping the schema and data separately
so that the schema file is small enough to edit manageably.  Once you
have a schema that loads into the 7.2 database, the data should follow
easily.

[ tries, and fails, to avoid making this comment... ]  Your time would
probably be more profitably invested on updating the 7.2 installation
to 7.3.  See the 7.3 release notes for reasons why.

            regards, tom lane

Re: dump 7.3 into 7.2?

From
"Ausrack Webmaster"
Date:
Tom,

Do you know if it is possible to upgrade postgresql on a RAQ4?

Jason


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Saturday, December 27, 2003 1:09 PM
To: Russ Schneider
Cc: pgsql-general
Subject: Re: [GENERAL] dump 7.3 into 7.2?


Russ Schneider <russ@sugapablo.com> writes:
> I need to transfer a dump from a psql 7.3 database to a 7.2 database.
> Is there any way to do this?

You will have to do some manual hacking on the schema declarations,
almost certainly.  I'd recommend dumping the schema and data separately
so that the schema file is small enough to edit manageably.  Once you
have a schema that loads into the 7.2 database, the data should follow
easily.

[ tries, and fails, to avoid making this comment... ]  Your time would
probably be more profitably invested on updating the 7.2 installation to
7.3.  See the 7.3 release notes for reasons why.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Re: several messages

From
Russ Schneider
Date:
On Fri, 26 Dec 2003, Russ Schneider wrote:

> I need to transfer a dump from a psql 7.3 database to a 7.2 database.
>
> Is there any way to do this?

In case anyone wants to know (or find out later searching the archives), I
was able to do this with minimal effort.

Here's what worked for me:

1) Dump the 7.3 DB using the --inserts clause.

2) Do a search and replace in the dumpfile, replacing
"pg_catalag.setval" with just "setval".

3) Comment out all the lines at the beginning that create the
databases themselves.

4) In 7.2, create the databases you need via the command line.

5) Dump the file back into 7.2.





--
[ Russ Schneider (a.k.a. Sugapablo)     ]
[ http://www.sugapablo.com <--music     ]
[ http://www.sugapablo.net <--personal  ]
[ sugapablo@12jabber.com   <--jabber IM ]