Re: Any form of connection-level "session variable" ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Any form of connection-level "session variable" ?
Дата
Msg-id 25636.1167941604@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Any form of connection-level "session variable" ?  (Erik Jones <erik@myemma.com>)
Список pgsql-general
>> John McCawley <nospam@hardgeus.com> writes:
>>> CREATE FUNCTION new_get_emp_id() RETURNS INTEGER AS $$ select emp_id
>>> from secureview.tbl_employee where username = (SELECT current_user) $$
>>> LANGUAGE SQL IMMUTABLE;

One other thing: that no-op sub-SELECT isn't doing anything for you
except adding overhead ... you might've needed it to allow index use
back in 7.2 or before, but not in any remotely modern PG release.

            regards, tom lane

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

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: Any form of connection-level "session variable" ?
Следующее
От: John McCawley
Дата:
Сообщение: Re: Any form of connection-level "session variable" ?