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 1tHqC0-00ABw8-6J for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 20:05:21 +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 1tHqBw-00A66F-SM for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 20:05:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHqBw-00A666-En for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 20:05:17 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHqBt-000Wyd-Lp for pgsql-general@postgresql.org; Sun, 01 Dec 2024 20:05:16 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Y1dDz739xz9sd6; Sun, 1 Dec 2024 21:05:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1733083508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4uIo/tFgIcHbxtOiS4GTc2SKNZV7JPJOOz9/5HX2lEk=; b=S/WTaogRozsci0cDQM5c46IBPXMvLxgQKlrFVoMpzX2/SGi+G/Qc3wF+6G7eHUXRZxwGXa psILEMTGad7Jn1l1REbqyNB1kQwjIZPqn1FOXwFLq4aVMDMkENFn57jGfG1kK6Nn/UWVqS DSemgNYx8XDpgIgs/UXxhrwJpwEYUtmNazvRTLE3QG6b+0sUdkUz3hJBp5KgwFbdWC+rx8 RC3BqQJ3psUm9EKVQze7zdwrcBQRRtekSBEHbdy4rYZnpV2yIwp4y9I5Ki7lLytZtG0xe3 Rn7sw0KDFwIBJKdhhyBW7Z1qn1tMe9kuszmb39ItfeDlBc3DNKLroPRz2iLavQ== Message-ID: <06425038-e012-4bac-aec1-d9541436f893@mailbox.org> Date: Sun, 1 Dec 2024 12:05:03 -0800 MIME-Version: 1.0 Subject: Re: Errors when restoring backup created by pg_dumpall To: Tom Lane , "David G. Johnston" Cc: Adrian Klaver , "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> Content-Language: en-US From: PopeRigby In-Reply-To: <1257068.1733025493@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-META: cwu6r5jaobhwj7chu6x78h63g5wmot1r X-MBO-RS-ID: 67df31df0aded1c753e List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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