Require the schema qualification in pg_temp.type_name(arg).
Noah Misch <noah@leadboat.com>
Require the schema qualification in pg_temp.type_name(arg). Commit aa27977fe21a7dfa4da4376ad66ae37cb8f0d0b5 introduced this restriction for pg_temp.function_name(arg); do likewise for types created in temporary schemas. Programs that this breaks should add "pg_temp." schema qualification or switch to arg::type_name syntax. Back-patch to 9.4 (all supported versions). Reviewed by Tom Lane. Reported by Tom Lane. Security: CVE-2019-10208
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/config.sgml | modified | +4 −0 |
| src/backend/catalog/namespace.c | modified | +14 −1 |
| src/backend/parser/parse_func.c | modified | +6 −1 |
| src/backend/parser/parse_type.c | modified | +21 −3 |
| src/backend/utils/adt/ruleutils.c | modified | +8 −0 |
| src/include/catalog/namespace.h | modified | +1 −0 |
| src/include/parser/parse_type.h | modified | +3 −0 |
| src/test/regress/expected/temp.out | modified | +15 −0 |
| src/test/regress/sql/temp.sql | modified | +11 −0 |