Re: 9.5 Create Function Set From Current taken at creation time?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: 9.5 Create Function Set From Current taken at creation time?
Дата
Msg-id 8cee0868-4d5c-beab-ea5d-82b8158d6e6b@2ndquadrant.com
обсуждение исходный текст
Ответ на 9.5 Create Function Set From Current taken at creation time?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: 9.5 Create Function Set From Current taken at creation time?
Список pgsql-bugs
On 8/8/16 5:46 PM, David G. Johnston wrote:
> """
> The SET clause causes the specified configuration parameter to be set to
> the specified value when the function is entered, and then restored to
> its prior value when the function exits. SET FROM CURRENT saves the
> session's current value of the parameter as the value to be applied when
> the function is entered.
> """
>
> https://www.postgresql.org/docs/current/static/sql-createfunction.html
>
> I expect the attached script to output "NOTICE: SP : thirdschema",
> instead it outputs "NOTICE: SP: otherschema"

I think the piece you are missing is that it saves the setting when the
function is created, not when it is run.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: 9.5 Create Function Set From Current taken at creation time?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: 9.5 Create Function Set From Current taken at creation time?