mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 14:12:51 +02:00
Do not cast date/timestamp exact searches in PostgreSQL to text
This commit is contained in:
committed by
Jakub Vrana
parent
f844fc499e
commit
e21ddd9767
@@ -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)"
|
||||
|
Reference in New Issue
Block a user