From 10ff74552d99a65c4671073384df925c8b8cd1f9 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 29 Jul 2025 16:47:47 +0200 Subject: [PATCH] PostgreSQL: Quote edit value with interval operator --- CHANGELOG.md | 1 + adminer/include/adminer.inc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6b35b68..9cef5662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - PostgreSQL: Hide only partitions, not all inherited tables from menu - PostgreSQL: Allow comparing json columns (bug #1107) - PostgreSQL: Shorten values in hstore columns +- PostgreSQL: Quote edit value with interval operator - PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089) - Elasticsearch: Support dropping aliases - Plugins: Methods afterConnect(), processList() and killProcess() diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 21b3ddfe..16da0335 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -754,7 +754,7 @@ class Adminer { } elseif (preg_match('~^([+-]|\|\|)$~', $function)) { $return = idf_escape($name) . " $function $return"; } 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)) { $return = "$function(" . idf_escape($name) . ", $return)"; } elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) {