Hi hackers,

This is Low item 2 from my list of 19 bugs in [1].

In v18 an unqualified CREATE SCHEMA element got the new schema's name
filled in. a9c350d9e stopped doing that, and the revert in 962e0a723
(e0fdc3f54b4 in 19) kept it.

So the name now goes through search_path, where pg_temp comes first:

  create temp table t (a int);
  create schema s
    create table t (a int)
    create index i on t (a);

On 19 and master the index lands on the temp table, with no error. A
trigger does the same, a foreign key in s.t fails, and a view on t
quietly becomes a temp view. v18 puts them in s, or raises an error
for the view.

0001 address it by fills in the name again as v18 did, on a copy of
the elements.

Thanks,
Shihao

Attachment: v1-0001-Qualify-unqualified-names-in-CREATE-SCHEMA-elemen.patch
Description: Binary data

Reply via email to