Re: pg_dump DROP commands and implicit search paths
От | Rod Taylor |
---|---|
Тема | Re: pg_dump DROP commands and implicit search paths |
Дата | |
Msg-id | 061e01c1fad7$d7aee300$0f02000a@jester обсуждение исходный текст |
Ответ на | pg_dump DROP commands and implicit search paths (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pg_dump DROP commands and implicit search paths
|
Список | pgsql-hackers |
> set search_path = my_schema; > This works fine unless the object name duplicates a system object; > in that case, since the effective search path is really "pg_catalog, > my_schema", the DROP will find and try to drop the system object. I must have missed that day. Why is that exactly? Clients like psql should probably explicitly specify pg_catalog path anyway. Afterall, if you create a my_schema.pg_class table (for whatever reason), and used my search path as my_schema, I'd expect my own to be hit with my queries. Likewise, postgresql internals should specifiy the specific namespace -- which they generally do through knowledge of the pg_class oid. Is this a temporary thing to tide clients over for a release without breaking too much? > 1. Explicitly qualify target-object names in the DROP commands, > ie, we'd emit Anyway, question at hand. How about a modification of #1. If the table begins in 'pg_' explicitly name it my_schema.pg_????. If users are creating stuff in pg_catalog they should be ready for weird things -- especially given the 'overriding' state it takes in the search path.
В списке pgsql-hackers по дате отправления: