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 1l30d1-0002u3-JA for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 17:53:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l30d0-0001uq-EA for pgsql-general@arkaria.postgresql.org; Fri, 22 Jan 2021 17:53:46 +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 1l30d0-0001uj-6a for pgsql-general@lists.postgresql.org; Fri, 22 Jan 2021 17:53:46 +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 1l30cx-00055R-GD for pgsql-general@postgresql.org; Fri, 22 Jan 2021 17:53:45 +0000 Received: from Marcio (unknown [186.226.37.77]) (Authenticated sender: marcio@zyontecnologia.com.br) by mailserver.concordia.psi.br (Postfix) with ESMTPA id A06051008F6D; Fri, 22 Jan 2021 15:53:40 -0200 (-02) From: =?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= To: "'Adrian Klaver'" , References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> <636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com> In-Reply-To: <636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com> Subject: RES: Error while running restore [SOLVED] Date: Fri, 22 Jan 2021 14:53:39 -0300 Message-ID: <005701d6f0e7$841727f0$8c4577d0$@com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Content-Language: pt-br Thread-Index: AdbwOTu8n7arKnjZTJajRRu15PCiswArcSqA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > > Hi all, > > > > I=92m getting this error message when try to restore a database : > > > > ERROR:=A0 function f_validanumero_cnpj_cpf(character) does not exist > > > > LINE 1: SELECT = (f_validanumero_cnpj_cpf(trim(cnpj_cpf)::char)=3Dfalse) > > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^ > > > > HINT:=A0 No function matches the given name and argument types. You = might > > need to add explicit type casts. > > > > QUERY:=A0 SELECT = (f_validanumero_cnpj_cpf(trim(cnpj_cpf)::char)=3Dfalse) > > > > CONTEXT:=A0 fun=C3=A7=C3=A3o 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=92m 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. >=20 > 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!