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 1tHati-008eVH-RQ for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 03:45: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 1tHatf-004OQB-2V for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 03:45:24 +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 1tHate-004OQ2-Ft for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 03:45:23 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tHatc-000Q9n-Jb for pgsql-general@postgresql.org; Sun, 01 Dec 2024 03:45:22 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aa530a94c0eso487578066b.2 for ; Sat, 30 Nov 2024 19:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733024719; x=1733629519; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7MbR/8igPizlZTBrlSwset+n8UDZ7lpVlZ3tZmPTYaY=; b=PTX7uo/JClm44vaZ0CRmOX0Em8YtHCUJCxnqV/+gE042mGC6SyDAC/d3hcZTjjG88h tG76ZG9t7Idh+7mEArMHNdpqnka9yLf+2xsIOeo7Nqrfdu50eXoP889qj+CD800t3LhU MUUmCOdJlWB2/xKst0k1Y4KS7cv7lkxIwoO0j8NGjgQMTaelBWGZ6IyjFq1VXD/94fSf 9MOJziLgjGsNxRt/WCff+K9DRVcfMsCoablPW8kJrKww+cWO1E6/DJFgCoLGqqM6Oedg ul6xf0vfOC506sbTPqwEA5UoqfavyQm1tAsC+9p9sFdcKjo8XlyQDk1awIby0lyg+RqR gYGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733024719; x=1733629519; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7MbR/8igPizlZTBrlSwset+n8UDZ7lpVlZ3tZmPTYaY=; b=QxSheIuZgZ7VQlA3uPH8BlSKIWjizzBqPg9BzXq642BZIHtyOSSb16fAulOAGwj2GU XIEux1DmHAMqlFpKnrph9DUwX6XHHO5JHAtW/vlI5blPwZlvaXeb53n8zYFzUDeeDNAJ HlgP5MmxnI+bGttFIiIg58rkNjIuGd9F5acfp2MysW6PJEGDTNcmWTSXfg9pjxY0Uncj ARijcLVC19fAKVD1byesghWlxp/+gR/SxtnWHp1LMmGZz/+vkqFAgQy6e5rpT+s1p4Fr 5cGWy1DSqXViHthZ7OYoQky8C2bw98OHzrRnLZkUkegiXMQyZ7Y4BLh1km6qxISVB4kR KHdQ== X-Forwarded-Encrypted: i=1; AJvYcCW8Hm1oCKXr5dfmE8NYxLBgfy80Q0kfxEZrX80Q7z33viM/vBID6Mcr+5AhmauUu8v3fZsal8cf7EdfCwtJ@postgresql.org X-Gm-Message-State: AOJu0YzQbKF1XzAw9A/1xfCE1yjsxDb0HK0QEqejtmmiXnhCMRhUg9pt /1Ry8rpKBcGtyrKdg2Pmf8O4ob7k6qh1OccOvAXfUIClSdmzszLrexMim6oQurxCL0Tls8Cip46 QSOPgMqNTKOq++vKXzK/qhu9aBBs= X-Gm-Gg: ASbGnctCCGmRKcp/Q7tzTxBbET1wWH1z+XOTfTZ5puIWhSea5f3sATL7q8+f3gfD3St WWKJN/WLPcP4Nrse5F99cPCoSdz3kBuFM X-Google-Smtp-Source: AGHT+IEdqMfm5OXtr0IPMsIYZQNOD6XRtYtGmP6+Ez7scGzjpag2B/yttTJQ/f5P56cjKSTLXOsaeCuUwa3i4myyqxI= X-Received: by 2002:a17:906:1baa:b0:aa5:449e:1a20 with SMTP id a640c23a62f3a-aa580ef33acmr1200746766b.12.1733024718439; Sat, 30 Nov 2024 19:45:18 -0800 (PST) MIME-Version: 1.0 References: <6a6439f1-8039-44e2-8fb9-59028f7f2014@mailbox.org> <9c5ba566-27b8-4e8c-bf7d-2dc561509991@mailbox.org> In-Reply-To: From: Marco Torres Date: Sat, 30 Nov 2024 20:45:05 -0700 Message-ID: Subject: Re: Errors when restoring backup created by pg_dumpall To: PopeRigby Cc: "David G. Johnston" , Adrian Klaver , pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000bacdbf06282d4265" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bacdbf06282d4265 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable CREATE EXTENSION cube; I do not know if you might need this one as well. I am assuming that you are working on a gist server. CREATE EXTENSION earthdistance; I am assuming you are working with a gist server. This ought to be useful. https://gist.cs.berkeley.edu/pggist/ You might want to read this: https://docs.gitlab.com/ee/install/postgresql_extensions.html My advice is to go to google, then chat GPT if you do not get any good feedback here. Hopefully, this will give you good leads. On Sat, Nov 30, 2024, 8:27=E2=80=AFPM PopeRigby wro= te: > On 11/30/24 18:41, David G. Johnston wrote: > > On Saturday, November 30, 2024, PopeRigby wrote: > >> On 11/30/24 17:27, David G. Johnston wrote: >> >> On Saturday, November 30, 2024, PopeRigby wrote: >> >>> On 11/29/24 17:47, Adrian Klaver wrote: >>> >>>> On 11/29/24 17:34, PopeRigby wrote: >>>> >>>> psql:all.sql:4104: ERROR: type "earth" does not exist >>>> LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::eart= h >>>> >>>> QUERY: SELECT >>>> cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(= radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth >>>> CONTEXT: SQL function "ll_to_earth" during inlining >>>> The earthdistance module is even getting added between the table with >>>> the earth type is added, so shouldn't there be no problem? >>>> >>> >> The fact that =E2=80=9Cearth=E2=80=9D is not schema qualified leads me t= o suspect you are >> getting bit by safe search_path environment rules. >> >> David J. >> >> Ah. How can I fix that? >> > Since you are past the point of fixing the source to produce valid > dumps=E2=80=A6that leaves finding the places in the text the lack the sch= ema > qualification and manually adding them in. > > David J. > > Oh boy. How can I prevent this from happening again? > --000000000000bacdbf06282d4265 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
CREATE EXTENSION cube;

I do not know if you might need this one as well. I a= m assuming that you are working on a gist server.
CREATE EXTENSION earthdist=
ance;

I am = assuming you are working with a gist server. This ought to be useful. https://gist.cs.berkeley.edu/pg= gist/

You might want= to read this:

My advice is to go to google, then chat GPT if you do not get any good = feedback here. Hopefully, this will give you good leads.

On Sat, Nov 30, 2024, 8:27=E2=80=AFPM PopeRigby <poperigby@mailbox.org> wrote:
=20 =20 =20
On 11/30/24 18:41, David G. Johnston wrote:
=20 On Saturday, November 30, 2024, PopeRigby <poperigby@mailbox.or= g> wrote:
On 11/30/24 17:27, David G. Johnston wrote:
On Saturday, November 30, 2024, PopeRigby <poperigby@mailbox.org> wrote:
On 11/29/24 17:47, Adrian Klaver wrote:
On 11/29/24 17:34, PopeRigby wrote:

psql:all.sql:4104: ERROR:=C2=A0 type "earth" does= not exist
LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians(= $1)))::earth

QUERY:=C2=A0 SELECT cube(cube(cube(earth()*cos(radians($1))= *cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(r= adians($1)))::earth
CONTEXT:=C2=A0 SQL function "ll_to_earth" during = inlining
=C2=A0The earthdistance module is even getting added betwee= n the table with the earth type is added, so shouldn't there be no problem?

The fact that =E2=80=9Cearth=E2=80=9D is not schema qualif= ied leads me to suspect you are getting bit by safe search_path environment rules.

David J.=C2=A0

Ah. How can I fix that?

Since you are past the point of fixing the source to produce valid dumps=E2=80=A6that leaves finding the places in the text the = lack the schema qualification and manually adding them in.

David J.

Oh boy. How can I prevent this from happening again?

--000000000000bacdbf06282d4265--