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 1tHalX-008dpS-Du for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 03:36:59 +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 1tHalU-004Iij-UY for pgsql-general@arkaria.postgresql.org; Sun, 01 Dec 2024 03:36:58 +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 1tHalU-004Iia-JG for pgsql-general@lists.postgresql.org; Sun, 01 Dec 2024 03:36:57 +0000 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHalS-000Q70-Fm for pgsql-general@postgresql.org; Sun, 01 Dec 2024 03:36:56 +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-101.mailbox.org (Postfix) with ESMTPS id 4Y1CJd4bXpz9snt; Sun, 1 Dec 2024 04:36:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1733024209; 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: in-reply-to:in-reply-to:references:references; bh=B+BKOVETbN9Hd8Jc1MFfQjJ9EhSHA9Y5abw4OcQ8Kd4=; b=QEUe9DRDcQHZ1h4PXwzchAKhqcbXs0XR8XiMq3ILbKZFEvsjENMI25Osul2f1AQVXEgQyG ARbgvhN2bIINMBd3Dk1j3Yay+sEBYNqs3b8M4rW+hkl5iFbC10sKltE2aD++Hwbf6MNHGw exJPZQTw4q9fC7MFau3D/q8BWQ3o+UQxvxD2iJ0Y7MZWyKDA6PkpAIS3vtOhg1yDTcyVhL 2dF1qiUdoaxY11cB16kWkbzV+aJ0179dMMy+wYxkrHar48etuLqIu1CVf3XTFXJ9FP4s9M yXTUDuII2smk0mocKA6p6ui8MJzdorBLE4r//NAMvxbam7G4grUDytxS4l+zGQ== Content-Type: multipart/alternative; boundary="------------fZXL2wQDU97DauH7oHwDkMrj" Message-ID: <41791b6d-aaf5-4fed-9cc3-e89bc49e8637@mailbox.org> Date: Sat, 30 Nov 2024 19:36:46 -0800 MIME-Version: 1.0 Subject: Re: Errors when restoring backup created by pg_dumpall To: "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> Content-Language: en-US From: PopeRigby In-Reply-To: X-MBO-RS-ID: af58b6cae9ad901d526 X-MBO-RS-META: uundbf3un7dbuihogk4wm3o1prqw3y7h List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------fZXL2wQDU97DauH7oHwDkMrj Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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)))::earth >> >> 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 “earth” is not schema qualified leads me to 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…that leaves finding the places in the text the lack the schema > qualification and manually adding them in. > > David J. > Oh also, it's the schema is specified as public on this line: https://gist.github.com/poperigby/fcb59eb6c22c6051800e06a0ec482b49#file-redacted_all-sql-L4111 Why is it not finding it? I queried public and earth was in there. --------------fZXL2wQDU97DauH7oHwDkMrj Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 11/30/24 18:41, David G. Johnston wrote:
On Saturday, November 30, 2024, PopeRigby <poperigby@mailbox.org> 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:  type "earth" does not exist
LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth

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 “earth” is not schema qualified leads me to 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…that leaves finding the places in the text the lack the schema qualification and manually adding them in.

David J.

Oh also, it's the schema is specified as public on this line: https://gist.github.com/poperigby/fcb59eb6c22c6051800e06a0ec482b49#file-redacted_all-sql-L4111

Why is it not finding it? I queried public and earth was in there.

--------------fZXL2wQDU97DauH7oHwDkMrj--