pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
To: 'Adrian Klaver' <adrian.klaver@aklaver.com>
To: pgsql-general@postgresql.org
Subject: RES: Error while running restore [SOLVED]
Date: Fri, 22 Jan 2021 14:53:39 -0300
Message-ID: <005701d6f0e7$841727f0$8c4577d0$@com.br> (raw)
In-Reply-To: <636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com>
References: <000601d6f01e$34f07fb0$9ed17f10$@com.br>
	<636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com>

> > 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.
> 
> Split where?
Dabase is very small. I open the dump file and with Ctrl X and Ctrl V I
create 2 news files. Than run in order each file.

> Is this function being used in a TRIGGER on esp_altera_estoque?
yes

Thank You Adrian and list!







Message-ID: <005701d6f0e7$841727f0$8c4577d0$@com.br>
Permalink:  ../005701d6f0e7$841727f0$8c4577d0$@com.br/
Also on:    postgresql.org/message-id/005701d6f0e7$841727f0$8c4577d0$@com.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: marcio@zyontecnologia.com.br, adrian.klaver@aklaver.com
  Subject: Re: Error while running restore [SOLVED]
  In-Reply-To: <005701d6f0e7$841727f0$8c4577d0$@com.br>
  References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> <636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com> <005701d6f0e7$841727f0$8c4577d0$@com.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox