Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2eti-0007ox-Lc for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 18:41:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2eth-00035n-Jx for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 18:41:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2eth-00035g-Br for pgsql-general@lists.postgresql.org; Thu, 21 Jan 2021 18:41:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2ete-0002SM-IZ for pgsql-general@postgresql.org; Thu, 21 Jan 2021 18:41:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10LIfTXt916107; Thu, 21 Jan 2021 13:41:29 -0500 From: Tom Lane To: =?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= cc: pgsql-general@postgresql.org Subject: Re: Error while running restore In-reply-to: <000601d6f01e$34f07fb0$9ed17f10$@com.br> References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> Comments: In-reply-to =?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= message dated "Thu, 21 Jan 2021 14:52:37 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <916105.1611254489.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Jan 2021 13:41:29 -0500 Message-ID: <916106.1611254489@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?iso-8859-1?Q?M=3DE1rcio_Ant=3DF4nio_Sepp?=3D writes: > I=C2=92m 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)=3Dfalse) > ^ > 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)=3Dfalse) > CONTEXT: fun=C3=A7=C3=A3o PL/pgSQL public.f_testacnpjcpf(character) lin= ha 31 em IF It looks like f_testacnpjcpf() is making unwarranted assumptions about wha= t 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