title: How to set some context variable for a user/connection
body: <p>I currently use Firebird SQL as the db backend of my shareware, would like to support also PG 9.3+.</p>
  
  <p>In FB I use set/get_context to do this:</p>
  
  <p><a href="http://www.firebirdsql.org/refdocs/langrefupd20-set-context.html" rel="noreferrer">set-context</a></p>
  
  <p><a href="http://www.firebirdsql.org/refdocs/langrefupd20-get-context.html" rel="noreferrer">get-context</a> </p>
  
  <p>e.g. I would do this after a user logs in:</p>
  
  <pre><code>select rdb$set_context('USER_SESSION', 'LANGUAGE_ID', %s) \
          from rdb$database" % appobj.loggedInUser.language.id
  </code></pre>
  
  <p>In some of my views I would then use:</p>
  
  <pre><code>... AND t.fk_language_id=rdb$get_context('USER_SESSION', 'LANGUAGE_ID')
  </code></pre>
  
  <p>I searched through PG doc and did some googling but didn't find a solution yet.</p>
  
  <p>Would appreciate any tips.
  Werner</p>