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