Re: BUG #15101: function set search_path = '' breaks dump/restore

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15101: function set search_path = '' breaks dump/restore
Дата
Msg-id 20180308081955.GG1788@paquier.xyz
обсуждение исходный текст
Ответ на BUG #15101: function set search_path = '' breaks dump/restore  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
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

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identitycolumn
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: BUG #15101: function set search_path = '' breaks dump/restore