diff options
Diffstat (limited to 'lib/db/adapterpgsql.php')
-rw-r--r-- | lib/db/adapterpgsql.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/db/adapterpgsql.php b/lib/db/adapterpgsql.php index acfc4201629..990d71c9f29 100644 --- a/lib/db/adapterpgsql.php +++ b/lib/db/adapterpgsql.php @@ -14,9 +14,10 @@ class AdapterPgSql extends Adapter { return $this->conn->fetchColumn('SELECT lastval()'); } + const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)'; public function fixupStatement($statement) { $statement = str_replace( '`', '"', $statement ); - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'cast(extract(epoch from current_timestamp) as integer)', $statement ); + $statement = str_ireplace( 'UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement ); return $statement; } } |