RES: Error while running restore

From: Márcio Antônio Sepp <marcio(at)zyontecnologia(dot)com(dot)br>
To: 'Márcio Antônio Sepp' <marcio(at)zyontecnologia(dot)com(dot)br>, <pgsql-general(at)postgresql(dot)org>
Subject: RES: Error while running restore
Date: 2021-01-21 17:59:10
Message-ID: 001601d6f01f$1ec50890$5c4f19b0$@com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ops, Server version tested are:
PostgreSQL 11.5

and

PostgreSQL 13.1

In both cases, i’m making dump and restore to the same Server.

--

Att

Márcio A. Sepp

De: Márcio Antônio Sepp [mailto:marcio(at)zyontecnologia(dot)com(dot)br]
Enviada em: quinta-feira, 21 de janeiro de 2021 14:53
Para: pgsql-general(at)postgresql(dot)org
Assunto: Error while running restore

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-01-21 18:41:29 Re: Error while running restore
Previous Message Márcio Antônio Sepp 2021-01-21 17:52:37 Error while running restore