Error while running restore - Mailing list pgsql-general

From Márcio Antônio Sepp
Subject Error while running restore
Date
Msg-id 000601d6f01e$34f07fb0$9ed17f10$@com.br
Whole thread Raw
Responses RES: Error while running restore
Re: Error while running restore
Re: Error while running restore
List pgsql-general

 

Hi all,

 

 

I’m getting this error message when try to restore a database :

 

ERROR:  function f_validanumero_cnpj_cpf(character) does not exist

LINE 1: SELECT (f_validanumero_cnpj_cpf(trim(cnpj_cpf)::char)=false)

                ^

HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

QUERY:  SELECT (f_validanumero_cnpj_cpf(trim(cnpj_cpf)::char)=false)

CONTEXT:  função PL/pgSQL public.f_testacnpjcpf(character) linha 31 em IF

COPY esp_altera_estoque, line 1, column nr_cnpjcpf: "24614011000120"

 

 

The funny is that i’m restoring the database to the same Server.

Steps:

pg_dump dbname > dumpfile

 

Create new database and restoring with:

psql < dumpfile

 

 

Witch making mistakes do am i making?

 

In this case, the database is small and if I open the dumpfile with a notepad and split in 2 files and run after other it works fine.

 

 

--

Att

Márcio A. Sepp

 

pgsql-general by date:

Previous
From: Benedict Holland
Date:
Subject: Re: Copy & Re-copy of DB
Next
From: Márcio Antônio Sepp
Date:
Subject: RES: Error while running restore