]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Do not cast time search
authorJakub Vrana <jakub@vrana.cz>
Thu, 1 Mar 2018 10:23:01 +0000 (11:23 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 1 Mar 2018 10:23:01 +0000 (11:23 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index 8f121322f6f6feb263c8bee2d7cbe62b44a0ec91..52aac65f7e99604d638ca0983b44dda0a3deaa3f 100644 (file)
@@ -195,7 +195,7 @@ if (isset($_GET["pgsql"])) {
 
                function convertSearch($idf, $val, $field) {
                        return (preg_match('~char|text'
-                                       . (!preg_match('~LIKE~', $val["op"]) ? '|date|timestamp' . (is_numeric($val["val"]) ? '|' . number_type() : '') : '')
+                                       . (!preg_match('~LIKE~', $val["op"]) ? '|date|time(stamp)?' . (is_numeric($val["val"]) ? '|' . number_type() : '') : '')
                                        . '~', $field["type"])
                                ? $idf
                                : "CAST($idf AS text)"
index 7a14ccaf6ff3cf0ef89c2195754f675787024742..03d0aeee6e10ac8cf8c3631e8b996eb8329c09f6 100644 (file)
@@ -3,6 +3,7 @@ Stop session before connecting
 Fix displaying info about non-alphabetical objects (bug #599)
 PDO: Support binary fields download
 MySQL: Use CONVERT() only when searching for non-ASCII (bug #603)
+PostgreSQL: Do not cast date/time searches to text
 
 Adminer 4.6.2 (released 2018-02-20):
 Semi-transparent border on table actions