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                                [EMAIL PROTECTED]
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 


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to