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 1l30Yg-0002kK-Ty for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 17:49:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l30Yf-0005dJ-Sf for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 17:49:17 +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 1l30Yf-0005dC-L0 for pgsql-general@lists.postgresql.org; Fri, 22 Jan 2021 17:49:17 +0000 Received: from cafe.concordia.psi.br ([189.91.194.2] helo=mailserver.concordia.psi.br) by makus.postgresql.org with smtp (Exim 4.92) (envelope-from ) id 1l30Yc-00052w-9N for pgsql-general@postgresql.org; Fri, 22 Jan 2021 17:49:15 +0000 Received: from Marcio (unknown [186.226.37.77]) (Authenticated sender: marcio@zyontecnologia.com.br) by mailserver.concordia.psi.br (Postfix) with ESMTPA id 48F4D10189F4; Fri, 22 Jan 2021 15:49:11 -0200 (-02) From: =?UTF-8?Q?M=C3=A1rcio_Ant=C3=B4nio_Sepp?= To: "'Tom Lane'" Cc: References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> <916106.1611254489@sss.pgh.pa.us> In-Reply-To: <916106.1611254489@sss.pgh.pa.us> Subject: RES: Error while running restore Date: Fri, 22 Jan 2021 14:49:10 -0300 Message-ID: <005001d6f0e6$e38c5ee0$aaa51ca0$@com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Content-Language: pt-br Thread-Index: AdbwJdYSp9qZsOPzTXOAWGaihQ0+ZAAnrfEA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi=20 > > I=E2=80=99m 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) = linha 31 em IF >=20 > 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(). Thank you. Setting set search_path to f_testacnpjcpf() works fine.=20 Thank you Tom! Thanks list!=20