Du kan använda sessionsvariabler i anpassat schema:
postgres=# set myvars.language_id = 10;
SET
postgres=# show myvars.language_id;
myvars.language_id
--------------------
10
(1 row)
eller via funktioner (http://www.postgresql.org/docs /9.4/static/functions-admin.html ):
postgres=# select set_config('myvars.language_id', '20', false);
set_config
------------
20
(1 row)
postgres=# select current_setting('myvars.language_id');
current_setting
-----------------
20
(1 row)