set remote addr in postgres connection

This commit is contained in:
Shish 2012-01-31 12:16:19 +00:00
parent 8192f278d5
commit c2689ba519

View file

@ -88,6 +88,10 @@ class MySQL extends DBEngine {
class PostgreSQL extends DBEngine {
var $name = "pgsql";
public function init($db) {
$db->query("SET application_name TO 'shimmie [{$_SERVER['REMOTE_ADDR']}]';");
}
public function scoreql_to_sql($data) {
$data = str_replace("SCORE_AIPK", "SERIAL PRIMARY KEY", $data);
$data = str_replace("SCORE_INET", "INET", $data);