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 1tHqLn-00AD0o-34 for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 20:15:27 +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 1tHqLk-00AFzK-DH for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 20:15:25 +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 1tHqLk-00AFzB-2U for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 20:15:25 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHqLh-000X36-Re for pgsql-general@postgresql.org; Sun, 01 Dec 2024 20:15:24 +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 4B1KF99T1455926; Sun, 1 Dec 2024 15:15:09 -0500 From: Tom Lane To: PopeRigby cc: "David G. Johnston" , Adrian Klaver , "pgsql-general@postgresql.org" Subject: Re: Errors when restoring backup created by pg_dumpall In-reply-to: <06425038-e012-4bac-aec1-d9541436f893@mailbox.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> Comments: In-reply-to PopeRigby message dated "Sun, 01 Dec 2024 12:05:03 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1455924.1733084109.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 01 Dec 2024 15:15:09 -0500 Message-ID: <1455925.1733084109@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PopeRigby writes: > I've applied the following patch to postgres: > https://www.postgresql.org/message-id/attachment/122092/0002-earthdistan= ce-sql-functions.patch Cool. You did actually install the new scripts into your target installation, right? > I'm still getting this error: > psql:all.sql:4102: ERROR:=C2=A0 type "earth" does not exist > LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth Hmmm ... a pg_dumpall output script shouldn't really contain that function body directly; it should just say "CREATE EXTENSION earthdistance". Is it possible that this database is so old that it contains a pre-extension (pre-9.1) version of earthdistance? regards, tom lane