On 2014-04-04 13:58:53 -0400, Tom Lane wrote: > Andres Freund <and...@2ndquadrant.com> writes: > > I wonder if we could extend the search path syntax to specify whether a > > schema should be used for creation of objects or not. Sounds somewhat > > nasty, but I don't really have a better idea :(. Something like > > search_patch=public,!pg_catalog. > > Hm ... doesn't fix the problem for existing dump files, which are going to > say "search_path = foo, pg_catalog". However, we could modify it a bit, > so that the marker is put on schemas that can be skipped if missing for > creation purposes. Then the default could look like "search_path = > !$user, public", while we still get safe behavior for pg_dump's commands.
Unfortunately the curren tsearch_path is probably enshrined in a couple of thousand postgresql.confs... How about simply refusing to create anything in pg_catalog unless it's explicitly schema qualified? Looks a bit nasty to implement but doable? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers