pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Post Gresql <postgresql@taljaren.se>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: pg_restore error on function
Date: Thu, 03 Nov 2022 12:32:24 -0400
Message-ID: <2135199.1667493144@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbHayOt1U7nVVYmZQBnmiKuivmfEdJEDMYb3HL6-ddAWA@mail.gmail.com>
References: <32b7cafd-e649-5478-017d-766036a2afbd@taljaren.se>
	<70b322b5-74dc-73db-f0b5-c8eaadd2570a@aklaver.com>
	<173c02e6-c914-b109-9a59-8f516261ebab@taljaren.se>
	<CAKFQuwbHayOt1U7nVVYmZQBnmiKuivmfEdJEDMYb3HL6-ddAWA@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Nov 3, 2022 at 8:39 AM Post Gresql <postgresql@taljaren.se> wrote:
>> Could it be that the
>> create function  <schema>.<function name>
>> in the dump file does not implicitly create the schema as a
>> create table <schema>.<table name>
>> would?

> I don't know where you got the idea that a schema is implicitly created via
> create table...a schema is never implicitly created.

Indeed.

> It is unlikely, though possible (casts were just fixed in 10.20), that
> you've discovered a dependency tracking bug.  At this point you would need
> to produce and show a self-contained test case to provide further help.
> The information you have shown so far indeed looks problematic but
> insufficient to diagnose further.

Yeah.  The explanation would seem to be that pg_dump didn't dump
"CREATE SCHEMA my_schema", or that pg_restore chose to skip that
object, or that one of them mistakenly thought that the CREATE
FUNCTION should be issued first.  None of those things should happen
AFAICS, and none of them does happen in a simple test case, so
there's something going on here that we've not been shown.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <2135199.1667493144@sss.pgh.pa.us>
Permalink:  ../2135199.1667493144@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2135199.1667493144@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, postgresql@taljaren.se, adrian.klaver@aklaver.com
  Subject: Re: pg_restore error on function
  In-Reply-To: <2135199.1667493144@sss.pgh.pa.us>
  References: <32b7cafd-e649-5478-017d-766036a2afbd@taljaren.se> <70b322b5-74dc-73db-f0b5-c8eaadd2570a@aklaver.com> <173c02e6-c914-b109-9a59-8f516261ebab@taljaren.se> <CAKFQuwbHayOt1U7nVVYmZQBnmiKuivmfEdJEDMYb3HL6-ddAWA@mail.gmail.com> <2135199.1667493144@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox