From: Erik Wienhold <ewie@ewie.name>
To: Arthur Bazin <arthurbazin@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_dump/pg_restore and the magic of the search_path
Date: Thu, 31 Aug 2023 23:47:40 +0200 (CEST)
Message-ID: <1686822272.145805.1693518460997@office.mailbox.org> (raw)
In-Reply-To: <CABjE6y3A-4NZEQLiy3tNM0VjVJcCOVHv0-pbWfp2RWycwfduuw@mail.gmail.com>
References: <CABjE6y3A-4NZEQLiy3tNM0VjVJcCOVHv0-pbWfp2RWycwfduuw@mail.gmail.com>
> On 31/08/2023 17:08 CEST Arthur Bazin <arthurbazin@gmail.com> wrote:
>
> Consider that we have a function in the public schema witch is named
> my_function_in_public.
>
> In PG11 this table :
> CREATE TABLE public.test_dump (
> id TEXT DEFAULT my_function_in_public()
> );
> When you dump this table with the pg11 binaries, you obtain this script :
> CREATE TABLE public.test_dump (
> id TEXT DEFAULT public.my_function_in_public()
> );
> => the schema prefix have been added to the function by pg_dump.
>
> In PG13, the same table :
> CREATE TABLE public.test_dump (
> id TEXT DEFAULT my_function_in_public()
> );
> When you dump this table with the pg13 binaries, you obtain this script :
> CREATE TABLE public.test_dump (
> id TEXT DEFAULT my_function_in_public()
> );
> => the schema prefix have not been added.
Are you sure that my_function_in_public was created in schema public on pg13?
I cannot reproduce this on 13.12. However, I can reproduce it when creating
that function in pg_catalog instead of public. The dump does not include
pg_catalog.my_function_in_public though.
--
Erik
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: ewie@ewie.name, arthurbazin@gmail.com
Subject: Re: pg_dump/pg_restore and the magic of the search_path
In-Reply-To: <1686822272.145805.1693518460997@office.mailbox.org>
References: <CABjE6y3A-4NZEQLiy3tNM0VjVJcCOVHv0-pbWfp2RWycwfduuw@mail.gmail.com> <1686822272.145805.1693518460997@office.mailbox.org>
* 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