1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

PostgreSQL: Quote edit value with interval operator

This commit is contained in:
Jakub Vrana
2025-07-29 16:47:47 +02:00
parent f5c7ab54f7
commit 10ff74552d
2 changed files with 2 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
- PostgreSQL: Hide only partitions, not all inherited tables from menu - PostgreSQL: Hide only partitions, not all inherited tables from menu
- PostgreSQL: Allow comparing json columns (bug #1107) - PostgreSQL: Allow comparing json columns (bug #1107)
- PostgreSQL: Shorten values in hstore columns - PostgreSQL: Shorten values in hstore columns
- PostgreSQL: Quote edit value with interval operator
- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089) - PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089)
- Elasticsearch: Support dropping aliases - Elasticsearch: Support dropping aliases
- Plugins: Methods afterConnect(), processList() and killProcess() - Plugins: Methods afterConnect(), processList() and killProcess()

View File

@@ -754,7 +754,7 @@ class Adminer {
} elseif (preg_match('~^([+-]|\|\|)$~', $function)) { } elseif (preg_match('~^([+-]|\|\|)$~', $function)) {
$return = idf_escape($name) . " $function $return"; $return = idf_escape($name) . " $function $return";
} elseif (preg_match('~^[+-] interval$~', $function)) { } elseif (preg_match('~^[+-] interval$~', $function)) {
$return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+\$~i", $value) ? $value : $return); $return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+\$~i", $value) && JUSH != "pgsql" ? $value : $return);
} elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) { } elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) {
$return = "$function(" . idf_escape($name) . ", $return)"; $return = "$function(" . idf_escape($name) . ", $return)";
} elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) { } elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) {