pg_restore 8.x to postgreSQL 9.x functions and triggers aren't created - Mailing list pgsql-general

From Raimon Fernandez
Subject pg_restore 8.x to postgreSQL 9.x functions and triggers aren't created
Date
Msg-id 04BC3F26-E6FF-4095-B9E6-1CC71198C60A@montx.com
Whole thread Raw
In response to Re: Getting number of affected rows after DELETE FROM  (Raimon Fernandez <coder@montx.com>)
Responses Re: pg_restore 8.x to postgreSQL 9.x functions and triggers aren't created [solved]  (Raimon Fernandez <coder@montx.com>)
Re: pg_restore 8.x to postgreSQL 9.x functions and triggers aren't created  (Vick Khera <vivek@khera.org>)
List pgsql-general
Hello,

We have two postgreSQL servers that are in the latest 9.x as testing, but when we use pg_dump and pg_restore, our
functionsand triggers are never copied to postgreSQL Server 9.x. 

This is how we restore:

data=`date +%Y_%m_%d`
pg_restore -c -i -h 192.168.0.9 -p 5432 -U postgres -d globalgest -v
"/Users/montx/documents/BackUp/globalgest/globalgest_"$data


we have only two warnings:
...
pg_restore: dropping FUNCTION rowsaffected()
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 32; 1255 36705 FUNCTION rowsaffected() postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  function public.rowsaffected() does not exist
    Command was: DROP FUNCTION public.rowsaffected();
pg_restore: dropping FUNCTION repairassentamentsnumero(integer)
pg_restore: dropping FUNCTION process_audit()
pg_restore: dropping FUNCTION increment_lock_version()
pg_restore: dropping FUNCTION increment(integer)
pg_restore: dropping FUNCTION getserialnumber(integer, integer)
pg_restore: dropping FUNCTION comptesrepair()
pg_restore: dropping FUNCTION rowsaffected()
pg_restore: [archiver (db)] Error from TOC entry 31; 1255 36704 FUNCTION rowsaffected() postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  function menus.rowsaffected() does not exist
    Command was: DROP FUNCTION menus.rowsaffected();
pg_restore: dropping FUNCTION process_audit()
pg_restore: dropping PROCEDURAL LANGUAGE plpgsql
pg_restore: dropping COMMENT SCHEMA public
pg_restore: dropping SCHEMA public
pg_restore: dropping SCHEMA menus
pg_restore: dropping SCHEMA audit
pg_restore: creating SCHEMA audit
pg_restore: creating SCHEMA menus
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: creating FUNCTION process_audit()
pg_restore: creating FUNCTION rowsaffected()
pg_restore: creating FUNCTION comptesrepair()
pg_restore: creating FUNCTION getserialnumber(integer, integer)
pg_restore: creating FUNCTION increment(integer)
pg_restore: creating FUNCTION increment_lock_version()
pg_restore: creating FUNCTION process_audit()
pg_restore: creating FUNCTION repairassentamentsnumero(integer)
pg_restore: creating FUNCTION rowsaffected()
pg_restore: creating FUNCTION updateallcomptes(integer)
pg_restore: creating FUNCTION updatecompte(integer)
pg_restore: creating FUNCTION updatecompte11(integer)
pg_restore: creating FUNCTION updatecompte3_5(integer)
pg_restore: creating TABLE assentaments
pg_restore: creating TABLE audit
...


when restoring the same file to any of our postgreSQL Servers 8.x we have no problems.

thanks,

r.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: RAISE with C?
Next
From: Raimon Fernandez
Date:
Subject: Re: pg_restore 8.x to postgreSQL 9.x functions and triggers aren't created [solved]