Search Postgresql Archives

user variables in session

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

 



Hi All,

I wasn't able to find any functions which would allow me to save/fetch/remove 
user variables local to pgsql session, e.g. -

1. select setvar('user variable name', 'user value'); 
2. select getvar('user variable name');
3. select delvar('user variable name');

Is there any way to do this with stock PostgreSQL, or via something in 
contrib?

Would pgsql's HTAB with hash_create and hash_search be a good basis for a  
simple C extension which would provide such feature ?

I found this to be quite useful in e.g. pl/pgsql triggers, for logging. 

-- 
Best Regards,
Igor Shevchenko

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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