pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
Cc: pgsql-general@postgresql.org
Subject: Re: Error while running restore
Date: Thu, 21 Jan 2021 13:41:29 -0500
Message-ID: <916106.1611254489@sss.pgh.pa.us> (raw)
In-Reply-To: <000601d6f01e$34f07fb0$9ed17f10$@com.br>
References: <000601d6f01e$34f07fb0$9ed17f10$@com.br>

=?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= <marcio@zyontecnologia.com.br> writes:
> 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

It looks like f_testacnpjcpf() is making unwarranted assumptions about what
search_path it's invoked under.  You could try schema-qualifying the
reference to f_validanumero_cnpj_cpf, or adding an explicit "SET
search_path" clause to f_testacnpjcpf().

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <916106.1611254489@sss.pgh.pa.us>
Permalink:  ../916106.1611254489@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/916106.1611254489@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, marcio@zyontecnologia.com.br
  Subject: Re: Error while running restore
  In-Reply-To: <916106.1611254489@sss.pgh.pa.us>
  References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> <916106.1611254489@sss.pgh.pa.us>

* 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