From: firstname lastname <ceccareb@talusmusic.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15263: pg_dump / psql failure. When loading, psql does not see function-based constraints or indices
Date: Wed, 18 Jul 2018 16:47:40 -0500 (CDT)
Message-ID: <136380404.83820.1531950460781@webmail.hostway.com> (raw)
In-Reply-To: <5a5639f6-5807-2856-8893-1d81c0102b24@2ndquadrant.com>
References: <153089394654.1402.10720489116717364594@wrigleys.postgresql.org>
<9d9fb168-027d-8cf5-8020-19cb188f2433@2ndquadrant.com>
<CB84C791-BAA6-4BAC-AF94-BFF2D67FCD8B@talusmusic.com>
<5a5639f6-5807-2856-8893-1d81c0102b24@2ndquadrant.com>
Peter,
Both of your suggestions work. I opted to change the search path in the dump file. The alternative is is to prefix "public" to hundreds of functions. I do not want to do that. Too much work. In the end, a person should be able to copy his objects a different schema; therefore, one would not want to hard-code a schema name to every object.
Do you consider #15263 a bug? Or starting with 10.x, is this expected behavior?
I attached a zip file. runtest.sh duplicates the problem automatically for you. And you are correct, when I create the database with schema_with_explicit_public.sql, psql loads the dump correctly.
Thanks for your help,
Brian
> On July 13, 2018 at 3:19 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
>
>
> On 07.07.18 16:50, ceccareb@talusmusic.com wrote:
> > Seems like a reasonable diagnosis. Apparently someone introduced this problem into 10.x. 9 works fine.
> >
> > Is there anything I can do? Or do know if someone is trying to fix this one?
>
> It looks like you might need to fix up your functions to handle schema
> search path changes. Either do SET search_path inside the function or
> attached to the function definition, or explicitly schema-qualify the
> function calls.
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
dumpfailuretest.zip (application/x-zip-compressed, 10.1K) download
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-bugs@postgresql.org
Cc: ceccareb@talusmusic.com, peter.eisentraut@2ndquadrant.com
Subject: Re: BUG #15263: pg_dump / psql failure. When loading, psql does not see function-based constraints or indices
In-Reply-To: <136380404.83820.1531950460781@webmail.hostway.com>
References: <153089394654.1402.10720489116717364594@wrigleys.postgresql.org> <9d9fb168-027d-8cf5-8020-19cb188f2433@2ndquadrant.com> <CB84C791-BAA6-4BAC-AF94-BFF2D67FCD8B@talusmusic.com> <5a5639f6-5807-2856-8893-1d81c0102b24@2ndquadrant.com> <136380404.83820.1531950460781@webmail.hostway.com>
* 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