Re: Temp table visibility

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Temp table visibility
Дата
Msg-id 20110805175341.GS49271@shinkuro.com
обсуждение исходный текст
Ответ на Re: Temp table visibility  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Aug 05, 2011 at 10:55:08AM -0400, Tom Lane wrote:
> Also, you can change the priority if you have a mind to, by adding
> "pg_temp" to the search_path explicitly, for example

Hey, that's cool, and it never occurred to me.  The current text in
the 9.0 manual says this:

    Likewise, the current session's temporary-table schema,
    pg_temp_nnn, is always searched if it exists. It can be explicitly
    listed in the path by using the alias pg_temp. If it is not listed
    in the path then it is searched first (even before
    pg_catalog). However, the temporary schema is only searched for
    relation (table, view, sequence, etc) and data type names. It is
    never searched for function or operator names.

That does not actually entail that if you put pg_temp elsewhere in the
search_path, it will affect things, though I guess it's sort of
implied (I'm a dunce).  Could I suggest a patch:

    . . . then it is searched first (even before pg_catalog); this can
    be changed by explicitly listing pg_temp in the search_path.  In
    any case, the temporary schema is only searched. . .

?

A

--
Andrew Sullivan
ajs@crankycanuck.ca

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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Filling null values
Следующее
От: Kiryl Mauryshchau
Дата:
Сообщение: using raise info to display array element