From marcio@zyontecnologia.com.br Thu Jan 21 17:52:37 2021 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 1l2e8X-0005AD-QB for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 17:52:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2e8W-0002EN-Pl for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 17:52:48 +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 1l2e8W-0002EF-IG for pgsql-general@lists.postgresql.org; Thu, 21 Jan 2021 17:52:48 +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 1l2e8Q-00027O-5K for pgsql-general@postgresql.org; Thu, 21 Jan 2021 17:52:46 +0000 Received: from Marcio (unknown [186.226.37.77]) (Authenticated sender: marcio@zyontecnologia.com.br) by mailserver.concordia.psi.br (Postfix) with ESMTPA id 3E9E410051CC for ; Thu, 21 Jan 2021 15:52:38 -0200 (-02) From: =?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= To: Subject: Error while running restore Date: Thu, 21 Jan 2021 14:52:37 -0300 Message-ID: <000601d6f01e$34f07fb0$9ed17f10$@com.br> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01D6F005.0FA347B0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdbwHjSrkrYtEXKlSHCp0ScB97Ib1A== Content-Language: pt-br List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_0007_01D6F005.0FA347B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 Hi all, =20 =20 I=92m getting this error message when try to restore a database : =20 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 COPY esp_altera_estoque, line 1, column nr_cnpjcpf: "24614011000120" =20 =20 The funny is that i=92m restoring the database to the same Server. Steps: pg_dump dbname > dumpfile =20 Create new database and restoring with: psql < dumpfile =20 =20 Witch making mistakes do am i making?=20 =20 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 =20 =20 -- Att M=E1rcio A. Sepp =20 ------=_NextPart_000_0007_01D6F005.0FA347B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

 

Hi = all,

 

 

I’m = 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’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. =

 

 

--

Att

M=E1rcio A. = Sepp

 

------=_NextPart_000_0007_01D6F005.0FA347B0-- From tgl@sss.pgh.pa.us Thu Jan 21 18:41:29 2021 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 From adrian.klaver@aklaver.com Thu Jan 21 21:00:52 2021 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 1l2h4l-0004kS-2z for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 21:01:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2h4j-00064N-N9 for pgsql-general@arkaria.postgresql.org; Thu, 21 Jan 2021 21:01:05 +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 1l2h4i-00064G-GX for pgsql-general@lists.postgresql.org; Thu, 21 Jan 2021 21:01:05 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2h4a-0003Zb-Lz for pgsql-general@postgresql.org; Thu, 21 Jan 2021 21:01:02 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5F9C75C022D; Thu, 21 Jan 2021 16:00:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 21 Jan 2021 16:00:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=L xkFoxW/v5XWVURx5+hYW8txB/mQoLW6kuXIyU2Pfwk=; b=liG8LU1bAEl5BnvPl qKupKeYvuz2+/ndtm83LJjy24SAMnAqSV7PR+SVg61h8csBGj2TqwMXksYwvWvr8 sG3UDsxoql2b2n/Mn7GYYj82udK+F3IP2CmdXftxMgfb17Yvux9opCnIh5SW0Eib RW8zBeX0KW/qQQ3Tw40jPzvoA1ZqqE3F7uz6R9mUOrA6LomfCtP3UDuueLAIMcf/ pEJlwI/lcCuM1jNoWsMoJNEw8gwWgRU7YA7OOR9emk7GvBl6PCIpHWXVzLtB55nr YHpO1jC2jMMJH5YILglRbbVN3HWFz4Gk2IalFGYBefYcl5qTquWvq5UTX+lNMbO6 zw4tg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=LxkFoxW/v5XWVURx5+hYW8txB/mQoLW6kuXIyU2Pf wk=; b=cyPJ2d4edCLM0PTo4kSdrQpbv72f3HHW19VL36V4PPgyVabCgqmmmVoeM 3U+ojc7qo6FPGYoC1ARDktYXcyRivyL7EOXZ++zQOw378KwK5HIxUl9pckvoV01V GgQGk4RHCdzIWVMZ0Fksh7mMTQ8FqKwnzobLALyEhR4Q4kpqc/2w5E66avv1klUh fHqZSaiHJbWLghNZkMsxF89YWsdPFoPr4tH/gW9Y3OKsAgaRKVbdjdxy0qVwSsu9 Sq6ZyBJ4JHWDs1gwPaNjOnnguLV5kR/taMnzsUtAn1654y5uoKIdSeMvrp2a/lsK 7hFVouEznomZZxYU4vP3+RJedeMFA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeggddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefheenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedvkefhhefhleekjeeuueelhedvgeejfeehlefftefh tdefffefgeetfffgheefffenucfkphepjeehrddujedvrddugedrudejnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (75-172-14-17.tukw.qwest.net [75.172.14.17]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E8D61080059; Thu, 21 Jan 2021 16:00:53 -0500 (EST) Subject: Re: Error while running restore To: =?UTF-8?B?TcOhcmNpbyBBbnTDtG5pbyBTZXBw?= , pgsql-general@postgresql.org References: <000601d6f01e$34f07fb0$9ed17f10$@com.br> From: Adrian Klaver Message-ID: <636692a0-0910-dfc8-f959-328935bbd73d@aklaver.com> Date: Thu, 21 Jan 2021 13:00:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <000601d6f01e$34f07fb0$9ed17f10$@com.br> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/21/21 9:52 AM, Márcio Antônio Sepp wrote: > 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? Is this function being used in a TRIGGER on esp_altera_estoque? > > -- > > Att > > Márcio A. Sepp > -- Adrian Klaver adrian.klaver@aklaver.com