mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Do not cast date/timestamp exact searches in PostgreSQL to text
This commit is contained in:
committed by
Jakub Vrana
parent
52d7c38ef1
commit
f844fc499e
@@ -194,7 +194,10 @@ if (isset($_GET["pgsql"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function convertSearch($idf, $val, $field) {
|
function convertSearch($idf, $val, $field) {
|
||||||
return (preg_match('~char|text' . (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '') . '~', $field["type"])
|
return (preg_match('~char|text'
|
||||||
|
. (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '')
|
||||||
|
. (!preg_match('~LIKE~', $val["op"]) ? '|date|timestamp' : '')
|
||||||
|
. '~', $field["type"])
|
||||||
? $idf
|
? $idf
|
||||||
: "CAST($idf AS text)"
|
: "CAST($idf AS text)"
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user