mirror of
https://github.com/vrana/adminer.git
synced 2026-08-31 03:58:41 +02:00
PostgreSQL: Cast to string when searching using LIKE (bug #325)
This commit is contained in:
@@ -181,6 +181,13 @@ if (isset($_GET["pgsql"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function convertSearch($idf, $val, $field) {
|
||||
return (preg_match('~char|text' . (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '') . '~', $field["type"])
|
||||
? $idf
|
||||
: "CAST($idf AS text)"
|
||||
);
|
||||
}
|
||||
|
||||
function warnings() {
|
||||
return $this->_conn->warnings();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user