From: Michael Paquier <michael@paquier.xyz>
To: andrew@tao11.riddles.org.uk
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15101: function set search_path = '' breaks dump/restore
Date: Thu, 8 Mar 2018 17:19:55 +0900
Message-ID: <20180308081955.GG1788@paquier.xyz> (raw)
In-Reply-To: <152049236165.23137.5241258464332317087@wrigleys.postgresql.org>
References: <152049236165.23137.5241258464332317087@wrigleys.postgresql.org>
On Thu, Mar 08, 2018 at 06:59:21AM +0000, PG Bug reporting form wrote:
> create or replace function foo()
> returns text language sql
> as $$
> select current_schemas(true)::text;
> $$
> set search_path = '';
>
> dump/restore (or \ef) fails with:
>
> ERROR: zero-length delimited identifier at or near """"
>
> The problem obviously being that pg_get_functiondef is returning invalid
> syntax for the search_path setting.
In this context pg_get_functiondef assigns quote as it sees that
search_path is of type GUC_LIST, which needs special handling. Likely
this needs more thoughts for empty values.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) 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: michael@paquier.xyz, andrew@tao11.riddles.org.uk
Subject: Re: BUG #15101: function set search_path = '' breaks dump/restore
In-Reply-To: <20180308081955.GG1788@paquier.xyz>
References: <152049236165.23137.5241258464332317087@wrigleys.postgresql.org> <20180308081955.GG1788@paquier.xyz>
* 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