I currently use Firebird SQL as the db backend of my shareware, would like to support also PG 9.3+.
In FB I use set/get_context to do this:
e.g. I would do this after a 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 then use:
... AND t.fk_language_id=rdb$get_context('USER_SESSION', 'LANGUAGE_ID')
I searched through PG doc and did some googling but didn't find a solution yet.
Would appreciate any tips. Werner