summaryrefslogtreecommitdiffstats
path: root/lib/db/adapterpgsql.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db/adapterpgsql.php')
-rw-r--r--lib/db/adapterpgsql.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/db/adapterpgsql.php b/lib/db/adapterpgsql.php
index 0084aad470e..acfc4201629 100644
--- a/lib/db/adapterpgsql.php
+++ b/lib/db/adapterpgsql.php
@@ -13,4 +13,10 @@ class AdapterPgSql extends Adapter {
public function lastInsertId($table) {
return $this->conn->fetchColumn('SELECT lastval()');
}
+
+ public function fixupStatement($statement) {
+ $statement = str_replace( '`', '"', $statement );
+ $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'cast(extract(epoch from current_timestamp) as integer)', $statement );
+ return $statement;
+ }
}