pg_dump problems in upgrading

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump problems in upgrading
Date: 2002-09-09 11:31:39
Message-ID: 1031571099.24419.199.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I am trying to populate a 7.3 database from a 7.2 dump. I used 7.3's
pg_dumpall, but this did not handle all the issues:

1. The language dumping needs to be improved:

CREATE FUNCTION plperl_call_handler () RETURNS opaque
^^^^^^^^^^^^^^
AS '/usr/local/pgsql/lib/plperl.so', 'plperl_call_handler'
LANGUAGE "C";
CREATE FUNCTION
GRANT ALL ON FUNCTION plperl_call_handler () TO PUBLIC;
GRANT
REVOKE ALL ON FUNCTION plperl_call_handler () FROM postgres;
REVOKE
CREATE TRUSTED PROCEDURAL LANGUAGE plperl HANDLER plperl_call_handler;
ERROR: function plperl_call_handler() does not return type language_handler


2. Either casts or extra default conversions may be needed:

CREATE TABLE cust_alloc_history (
customer character varying(8) NOT NULL,
product character varying(10) NOT NULL,
"year" integer DEFAULT date_part('year'::text, ('now'::text)::timestamp(6) with time zone) NOT NULL,
jan integer DEFAULT 0 NOT NULL,
feb integer DEFAULT 0 NOT NULL,
mar integer DEFAULT 0 NOT NULL,
apr integer DEFAULT 0 NOT NULL,
may integer DEFAULT 0 NOT NULL,
jun integer DEFAULT 0 NOT NULL,
jul integer DEFAULT 0 NOT NULL,
aug integer DEFAULT 0 NOT NULL,
sep integer DEFAULT 0 NOT NULL,
oct integer DEFAULT 0 NOT NULL,
nov integer DEFAULT 0 NOT NULL,
dbr integer DEFAULT 0 NOT NULL,
CONSTRAINT c_a_h_year CHECK (((float8("year") <= date_part('year'::text, ('now'::text)::timestamp(6) with time zone)) AND ("year" > 1997)))
);
ERROR: Column "year" is of type integer but default expression is of type double precision
You will need to rewrite or cast the expression


3. A view is being created before one of the tables it refers to.
Should not views be created only at the very end?

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Submit yourselves therefore to God. Resist the devil,
and he will flee from you." James 4:7

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mario Weilguni 2002-09-09 11:50:59 Re: Script to compute random page cost
Previous Message Teodor Sigaev 2002-09-09 11:27:38 Re: contrib/ intarray, ltree, intagg broken(?) by array