Re: [pg_dump] 'create index' statement is failing due to search_path is empty

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pg_dump] 'create index' statement is failing due to search_path is empty
Дата
Msg-id 28215.1588084263@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [pg_dump] 'create index' statement is failing due to search_path isempty  (tushar <tushar.ahuja@enterprisedb.com>)
Список pgsql-hackers
tushar <tushar.ahuja@enterprisedb.com> writes:
> While testing something else ,i found 1 scenario  where pg_dump  is failing

> CREATE FUNCTION do_analyze() RETURNS VOID VOLATILE LANGUAGE SQL
>          AS 'ANALYZE pg_am';
> CREATE FUNCTION wrap_do_analyze(c INT) RETURNS INT IMMUTABLE LANGUAGE SQL
>          AS 'SELECT $1 FROM do_analyze()';
> CREATE INDEX ON vaccluster(wrap_do_analyze(i));
> INSERT INTO vaccluster VALUES (1), (2);

You failed to schema-qualify the function reference.  That's not
a pg_dump bug.

While we're on the subject: this is an intentionally unsafe index.
The system doesn't try very hard to prevent you from lying about the
volatility status of a function ... but when, not if, it breaks
we're not going to regard the consequences as a Postgres bug.
Basically, there isn't anything about this example that I'm not
going to disclaim as "that's not supported".

            regards, tom lane



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

Предыдущее
От: Jesse Zhang
Дата:
Сообщение: Re: Fix compilation failure against LLVM 11
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: More efficient RI checks - take 2