From: | Stefan Armbruster <sarmbruster(at)web(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | migrating data from 7.3.x down to 7.2.x |
Date: | 2003-07-14 14:04:49 |
Message-ID: | 1058191489.1989.49.camel@emperor.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I tried to migrate a database from 7.3.2 down to PostgreSQL 7.2.2 and
got some trouble. The database contains various plpgsql triggers. Here
what I tried:
On the machine running 7.3.2, I typed:
pg_dump -U sguru sguru_test > sguru.dmp
sguru.dmp is a text-style file. I copied sguru.dmp to the maschine
running 7.2.2 and typed there
createdb -U postgres sguru_test
psql -f sguru.dmp sguru_test sguru
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
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?
Or any other suggestions?
Kind regards,
Stefan
***************** ERRORS of psql call ********************************
You are now connected as new user postgres.
psql:sguru.dmp:7: ERROR: parser: parse error at or near "public"
psql:sguru.dmp:16: NOTICE: ProcedureCreate: type language_handler is
not yet defined
CREATE
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"
...
...
***************** The first lines of sguru.dmp are ********************
--
-- PostgreSQL database dump
--
\connect - postgres
SET search_path = public, pg_catalog;
--
-- TOC entry 163 (OID 29597)
-- Name: plpgsql_call_handler (); Type: FUNCTION; Schema: public; Owner:
postgres
--
CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler
AS '$libdir/plpgsql', 'plpgsql_call_handler'
LANGUAGE c;
--
-- TOC entry 162 (OID 29598)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: public; Owner:
--
CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;
\connect - sguru
SET search_path = public, pg_catalog;
--
-- TOC entry 2 (OID 29599)
-- Name: mail_spooler; Type: TABLE; Schema: public; Owner: sguru
--
CREATE TABLE mail_spooler (
objectid numeric(19,0) NOT NULL,
trial smallint,
error_msg character varying(255),
to_adr character varying(255) NOT NULL,
subject character varying(255),
body text,
objectversion integer NOT NULL,
from_adr character varying(50) NOT NULL,
cc_adr character varying(255),
bcc_adr character varying(255)
);
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph.Mehne | 2003-07-14 14:40:27 | Download of Postgres by ftp |
Previous Message | nolan | 2003-07-14 12:32:21 | Re: Auto Starting Postgresql Under Mandrake 9.1 ?? |