Re: Feature request: temporary schemas

Поиск
Список
Период
Сортировка
От Pete Hollobon
Тема Re: Feature request: temporary schemas
Дата
Msg-id CACojYcFi-5mAf7sqmD0iFnh5+X63dTJwZGwp9Xo40GNiLRvuAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Feature request: temporary schemas  (cowwoc <cowwoc@bbs.darktech.org>)
Список pgsql-general
On 14 September 2014 22:01, cowwoc <cowwoc@bbs.darktech.org> wrote:
Hi,

I'd like to propose the ability to create temporary schemas.

Unlike temporary tables, this feature would enable developers to create a
temporary schema once and execute CREATE TABLE statements without the
TEMPORARY parameter.

I think you can use "pg_temp" for this - it's an alias to the current session's temporary schema. If you set the current schema with "SET search_path TO pg_temp", all tables, views, functions and so on will be created in a temporary schema.

The only downside is that you'd need to reference any function calls with pg_temp explicitly, as pg_temp is "never searched for function or operator names" (see http://www.postgresql.org/docs/current/static/runtime-config-client.html).

I have just replied to your Stack Exchange answer too.

В списке pgsql-general по дате отправления:

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Detecting query timeouts properly
Следующее
От: Xiang Gan
Дата:
Сообщение: Installing Postgresql on Linux Friendlyarm