pg_dump problems in upgrading - Mailing list pgsql-hackers

From Oliver Elphick
Subject pg_dump problems in upgrading
Date
Msg-id 1031571099.24419.199.camel@linda
Whole thread Raw
Responses Re: pg_dump problems in upgrading  (Philip Warner <pjw@rhyme.com.au>)
Re: pg_dump problems in upgrading  (Philip Warner <pjw@rhyme.com.au>)
Re: pg_dump problems in upgrading  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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
CREATETRUSTED PROCEDURAL LANGUAGE plperl HANDLER plperl_call_handler;   ERROR:  function plperl_call_handler() does not
returntype 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)
NOTNULL,       "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
integerDEFAULT 0 NOT NULL,       may integer DEFAULT 0 NOT NULL,       jun integer DEFAULT 0 NOT NULL,       jul
integerDEFAULT 0 NOT NULL,       aug integer DEFAULT 0 NOT NULL,       sep integer DEFAULT 0 NOT NULL,       oct
integerDEFAULT 0 NOT NULL,       nov integer DEFAULT 0 NOT NULL,       dbr integer DEFAULT 0 NOT NULL,       CONSTRAINT
c_a_h_yearCHECK (((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
willneed 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.Elphick@lfix.co.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
fromyou."        James 4:7 
 



pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: contrib/ intarray, ltree, intagg broken(?) by array
Next
From: "Mario Weilguni"
Date:
Subject: Re: Script to compute random page cost