Re: Errors when restoring backup created by pg_dumpall

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: PopeRigby <poperigby(at)mailbox(dot)org>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Errors when restoring backup created by pg_dumpall
Date: 2024-12-01 20:15:09
Message-ID: 1455925.1733084109@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PopeRigby <poperigby(at)mailbox(dot)org> writes:
> I've applied the following patch to postgres:
> https://www.postgresql.org/message-id/attachment/122092/0002-earthdistance-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:  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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2024-12-01 20:36:28 Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Previous Message PopeRigby 2024-12-01 20:05:03 Re: Errors when restoring backup created by pg_dumpall