Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHrBK-00AJOj-RU for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 21:08:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tHrBH-00AjMs-At for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 21:08:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHrBF-00AjMk-LL for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 21:08:40 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHrB9-000XJY-Sv for pgsql-general@postgresql.org; Sun, 01 Dec 2024 21:08:37 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 51C9B1140226; Sun, 1 Dec 2024 16:08:30 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sun, 01 Dec 2024 16:08:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733087310; x=1733173710; bh=BLFfGy7t2aQ8z7aK/2irUTTDwrRvSdpj3jl0BJFhAYY=; b= pS/hvy5tJMqANXRnLc0lexg9twmCwTfkSHJ2ocNn5uXbOno5ySNN5+HPjDy72+qv r+3EXC8pjhNPgMXMvLX83Pqb6J1WNhKveUN1x2X6/3kjHjeR4iP43IoRVXM6cqRb pASDXK5CMczmVa8Xz1EyucY31axXNYSbu4TqByL6LiruBzO34KeSo2wDnx4qip81 ieSO6TPJE1L/idU2oqzy7KFHLIo1uZbTbYO6K18TKezVTEG9hx5crbmUHKTFvFH0 /bYCn9ms+OHalWnB46UXVJNIh7DnGOqTsvJTIcF7ZgBCz1tmfoMBqmwh6rB0ceyX ZYb5iFpXBT7xqMIQxWia5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1733087310; x= 1733173710; bh=BLFfGy7t2aQ8z7aK/2irUTTDwrRvSdpj3jl0BJFhAYY=; b=W CkhjWij1ZbXdm5Bfkq/+EM3CeDmb7NqRU2HNBsh6MJgtlIBSMpii0xCJQ+BQMSwW slJDqsWQUFU4Y2DHvrPU0smVe1BZobenwfdI5C49OgR5KjE4swxcTA57KeSye2E/ F/kVaaT0wQidWqf8XvugllkXl/1eKZk7e+WmSwwF2ihrQUyUPSlP/UbXC0yaChmV r57iqmuHNlhL3fMH+zQADumd63DM7LhGqNBXjB3y/kt/7Hnc86kqm+ikD69vZZYn 7zxUdq4jRulVNJkdNnRR6ZZQpXLJ/nISdpfPcsmNQAsOr4rcZ8IQLVeaNPSs/wty nCMYAzc0Njmyq8VpjkHJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrheejgddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepgfdufeekhfevfeelveei ueevhedvuddukeduvddvlefhueeuieejtdeuvdevvdeunecuffhomhgrihhnpehpohhsth hgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsg gprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpohhpvghr ihhgsgihsehmrghilhgsohigrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghh drphgrrdhushdprhgtphhtthhopegurghvihgurdhgrdhjohhhnhhsthhonhesghhmrghi lhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvsh hqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Dec 2024 16:08:29 -0500 (EST) Message-ID: <92405f98-7f0c-4442-8252-697352daefc1@aklaver.com> Date: Sun, 1 Dec 2024 13:08:28 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Errors when restoring backup created by pg_dumpall To: PopeRigby , Tom Lane , "David G. Johnston" Cc: "pgsql-general@postgresql.org" References: <6a6439f1-8039-44e2-8fb9-59028f7f2014@mailbox.org> <9c5ba566-27b8-4e8c-bf7d-2dc561509991@mailbox.org> <41791b6d-aaf5-4fed-9cc3-e89bc49e8637@mailbox.org> <1257068.1733025493@sss.pgh.pa.us> <06425038-e012-4bac-aec1-d9541436f893@mailbox.org> Content-Language: en-US From: Adrian Klaver In-Reply-To: <06425038-e012-4bac-aec1-d9541436f893@mailbox.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/1/24 12:05, PopeRigby wrote: > On 11/30/24 19:58, Tom Lane wrote: >> "David G. Johnston" writes: >>> Ok, so the error is not emanating from your code but rather the body >>> of the >>> ll_to_earth function defined in the earthdistance extension. >> Yeah.  That is >> >> CREATE FUNCTION ll_to_earth(float8, float8) >> RETURNS earth >> LANGUAGE SQL >> IMMUTABLE STRICT >> PARALLEL SAFE >> AS 'SELECT >> cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth'; >> >> which is problematic: the function calls are not schema-qualified and >> there's not a really easy way to fix that.  There's work afoot to fix >> that [1], but it's not committed yet let alone in any shipping >> version.  Nonetheless, your best bet for fixing this might be >> to install the earthdistance 1.2 files from the latest patchset in >> that thread. >> >>             regards, tom lane >> >> [1] >> https://www.postgresql.org/message-id/flat/3395418.1618352794@sss.pgh.pa.us > > I've applied the following patch to postgres: > > https://www.postgresql.org/message-id/attachment/122092/0002-earthdistance-sql-functions.patch > > I'm still getting this error: > > psql:all.sql:4102: ERROR:  type "earth" does not exist > LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth > The issue is still this: SELECT pg_catalog.set_config('search_path', '', false); in the pg_dumpall output. As was suggested before change the above to: SELECT pg_catalog.set_config('search_path', 'public', false); in the pg_dumpall output file. -- Adrian Klaver adrian.klaver@aklaver.com