Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> John McCawley <nospam@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux