From: Matěj Humpál Date: Wed, 28 Feb 2018 15:17:12 +0000 (+0100) Subject: Do not cast date/timestamp exact searches in PostgreSQL to text X-Git-Tag: v4.6.3~49 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=e21ddd9767470818f193d4f8e7b4b124a59af074;p=adminer.git Do not cast date/timestamp exact searches in PostgreSQL to text --- diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 63846844..8f121322 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -195,8 +195,7 @@ if (isset($_GET["pgsql"])) { function convertSearch($idf, $val, $field) { return (preg_match('~char|text' - . (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '') - . (!preg_match('~LIKE~', $val["op"]) ? '|date|timestamp' : '') + . (!preg_match('~LIKE~', $val["op"]) ? '|date|timestamp' . (is_numeric($val["val"]) ? '|' . number_type() : '') : '') . '~', $field["type"]) ? $idf : "CAST($idf AS text)"