From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [pg_dump] 'create index' statement is failing due to search_path is empty |
Date: | 2020-04-28 14:31:03 |
Message-ID: | 28215.1588084263@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
tushar <tushar(dot)ahuja(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2020-04-28 14:31:54 | Re: More efficient RI checks - take 2 |
Previous Message | Jesse Zhang | 2020-04-28 14:15:49 | Re: Fix compilation failure against LLVM 11 |