Re: Temporary tables and miscellaneous schemas
От | Tom Lane |
---|---|
Тема | Re: Temporary tables and miscellaneous schemas |
Дата | |
Msg-id | 7040.1067288494@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Temporary tables and miscellaneous schemas (Sean Chittenden <sean@chittenden.org>) |
Ответы |
Re: Temporary tables and miscellaneous schemas
Re: Temporary tables and miscellaneous schemas |
Список | pgsql-general |
Sean Chittenden <sean@chittenden.org> writes: > Um, I forget whether or not this was given any credence or anyone > weighed in on it, but what about having two modes for psql? An admin > mode which hides nothing and is the default for superuser connections, > and a user mode which is the default for non-DBA connections. I thought that would be likely to create more confusion than it solves. To take just one problem, the newbies who could use the "friendly user" mode are very likely the same ones who do all their work as postgres, because it hasn't occurred to them to create any unprivileged users. They won't get the benefit of it if we make it act as you suggest. BTW, if I lose this argument, there *is* a workable way to get the behavior Bruce wants: use current_schemas() to detect which temp schema is in your search path. regression=# select nspname from pg_namespace; nspname -------------------- pg_temp_2 pg_toast pg_temp_1 pg_catalog public information_schema (6 rows) regression=# select nspname from pg_namespace where nspname not like regression-# 'pg\\_temp\\_%' or nspname = any (current_schemas(true)); nspname -------------------- pg_toast pg_catalog public information_schema (4 rows) regression=# create temp table foo(f1 int); CREATE TABLE regression=# select nspname from pg_namespace where nspname not like regression-# 'pg\\_temp\\_%' or nspname = any (current_schemas(true)); nspname -------------------- pg_temp_2 pg_toast pg_catalog public information_schema (5 rows) regards, tom lane
В списке pgsql-general по дате отправления: