set remote addr in postgres connection
This commit is contained in:
parent
8192f278d5
commit
c2689ba519
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue