I am currently using Firebird SQL as a backend for my shareware, I would also like to support PG 9.3 +.
In FB, I use set / get_context for this:
set-context
get-context
eg. I would do this after the user logs in:
select rdb$set_context('USER_SESSION', 'LANGUAGE_ID', %s) \
from rdb$database" % appobj.loggedInUser.language.id
In some of my views, I would use:
... AND t.fk_language_id=rdb$get_context('USER_SESSION', 'LANGUAGE_ID')
I looked through the PG document and did some search queries, but couldn't find a solution.
Would thank for the advice. Werner
source
share