From 39f42c7291101df7edf4f7880be5eba1e957c3b0 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Thu, 3 Sep 2020 11:51:34 +0200 Subject: escape uppercase field names for postgresql --- it_dbi.class | 2 ++ 1 file changed, 2 insertions(+) diff --git a/it_dbi.class b/it_dbi.class index 316f3ca..79c3e03 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -413,6 +413,8 @@ function _where($params) if ($dyncols_enabled && $this->_fields['dyncols'] && !$this->_fields[$field] && strpos($field, '(') === false) $field = $this->_json_extract('dyncols', $field); + else if (it::match('^\w*[A-Z]\w+$', $field, 'casesensitive' => 1)) + $field = $this->escape_name($field); switch ($op) { -- cgit v1.2.3