Re: erroneous restore into pg_catalog schema
Dimitri Fontaine <dimitri@2ndquadrant.fr>
From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "Erik Rijkers" <er@xs4all.nl>, pgsql-hackers@postgresql.org
Date: 2013-01-13T20:50:06Z
Lists: 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
Commits
-
Extend and improve use of EXTRA_REGRESS_OPTS.
- 4ae5ee6c9b4d 9.3.0 cited
-
Remove misplaced sanity check from heap_create().
- a475c6036752 9.3.0 cited
-
Silently ignore any nonexistent schemas that are listed in search_path.
- 880bfc3287dd 9.2.0 cited