Merge branch 'bugfix/postgres-wrong-default-timestamps-7919'

fixes #7919
This commit is contained in:
Eric Lippmann 2015-01-19 13:51:19 +01:00
commit 0c35607e37
1 changed files with 5 additions and 0 deletions

View File

@ -323,6 +323,11 @@ abstract class IdoQuery extends DbQuery
foreach ($columns as $key => & $value) {
$value = preg_replace('/ COLLATE .+$/', '', $value);
$value = preg_replace('/inet_aton\(([[:word:].]+)\)/i', '$1::inet - \'0.0.0.0\'', $value);
$value = preg_replace(
'/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i',
'CASE WHEN ($1 < \'1970-01-03 00:00:00+00\'::timestamp with time zone) THEN 0 ELSE UNIX_TIMESTAMP($1) END',
$value
);
}
}
}