Re: erroneous restore into pg_catalog schema

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: erroneous restore into pg_catalog schema
Дата
Msg-id m2txqkyfi9.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: erroneous restore into pg_catalog schema  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: erroneous restore into pg_catalog schema  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> I think maybe what we should do is have namespace.c retain an explicit
> notion that "the first schema listed in search_path didn't exist", and
> then throw errors if any attempt is made to create objects without an
> explicitly specified namespace.

I don't much like this.
 SET search_path TO dontexist, a, b; CREATE TABLE foo();

And the table foo is now in a (provided it exists). Your proposal would
break that case, right?  The problem is that the search_path could come
from too many places: postgresql.conf, ALTER ROLE, ALTER DATABASE etc.

And I have seen roles setup with some search_path containing schema that
will only exist in some of the database they can connect to…

--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: logical changeset generation v3 - comparison to Postgres-R change set format
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)