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