I am programming web portal. I have table c_language with attributes i_language_id INT4 PK c_code CHAR(2) NOT NULL UNIQUE v_name VARCHAR(32)
and tables referenced to c_language. I need create some variable, which contain value of i_language_id during one web request.
at start of request I create temporary table f.e.: SELECT i_language_id INTO lang FROM c_language WHERE c_code='EN';
There is stored procedure get_lang(); which only do SELECT i_language_id FROM land;
Every view is build like f.e.: SELECT * FROM TABLE WHERE i_language_id=get_lang();
this create, that on my application layer I need not write language condition into every query.
but creating of temporary table in every web request is IMHO slow. Is there another way, how to store temporary variable into postgres.
thanx, hlavki
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings