Re: Any form of connection-level "session variable" ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Any form of connection-level "session variable" ?
Date
Msg-id 25636.1167941604@sss.pgh.pa.us
Whole thread Raw
In response to Re: Any form of connection-level "session variable" ?  (Erik Jones <erik@myemma.com>)
List 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 by date:

Previous
From: Erik Jones
Date:
Subject: Re: Any form of connection-level "session variable" ?
Next
From: John McCawley
Date:
Subject: Re: Any form of connection-level "session variable" ?