Re: set search_path and pg_dumpall
От | Tom Lane |
---|---|
Тема | Re: set search_path and pg_dumpall |
Дата | |
Msg-id | 9701.1074539492@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: set search_path and pg_dumpall (Robert Treat <xzilla@users.sourceforge.net>) |
Список | pgsql-hackers |
Robert Treat <xzilla@users.sourceforge.net> writes: > I can't be the only one forsee frustration from users who typo the set > search_path statement and then can't figure out why their tables aren't > showing up... can we emit a warning that not all of the schemas in the > search path were found? Since no one else commented, I've followed your suggestion. As of CVS tip, you get a NOTICE not ERROR in this case: regression=# set search_path = public,z; ERROR: schema "z" does not exist regression=# create database foo; CREATE DATABASE regression=# alter database foo set search_path = public,z; NOTICE: schema "z" does not exist ALTER DATABASE regression=# select datconfig from pg_database where datname = 'foo'; datconfig ---------------------------{"search_path=public, z"} (1 row) If a bogus entry is present in the established search_path value, it's just ignored (this was true already to handle "$user"): regression=# \c foo You are now connected to database "foo". foo=# show search_path;search_path -------------public, z (1 row) foo=# select current_schemas(true); current_schemas ---------------------{pg_catalog,public} (1 row) regards, tom lane
В списке pgsql-hackers по дате отправления: