mirror of
https://github.com/postgres/postgres.git
synced 2026-07-08 09:10:57 -04:00
Base de données relationnelle
The two-argument jsonb @? and @@ operators invoke the jsonpath executor with no variable set. In that case getJsonPathVariable() treated any "$name" reference as JSON null and continued evaluating, instead of reporting the variable as undefined. This produced incorrect results -- for example '42'::jsonb @? '$"x"' returned true -- and, for some malformed or hostile jsonpath expressions with deeply nested predicates, allowed essentially unbounded memory consumption that could get the backend killed by the OOM killer. Report the undefined variable as an error in this case as well, reusing the message already emitted when a variable is not found among supplied variables. This matches the behavior of v17 and later, where the jsonpath executor was reorganized. Stopping at the first undefined variable reference also resolves the reported memory-growth case. Note this is a user-visible change in the back branches: a jsonpath expression that references a variable while no variables are supplied now raises an error rather than silently evaluating it as NULL. The previous behavior was incorrect, so the change is judged worthwhile. Bug: #19458 Reported-by: Andrey Rachitskiy <pl0h0yp1@gmail.com> Author: Andrey Rachitskiy <pl0h0yp1@gmail.com> Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru> Reviewed-by: Nikita Malakhov <hukutoc@gmail.com> Reviewed-by: Amit Langote <amitlangote09@gmail.com> Discussion: https://postgr.es/m/19458-a69c98bc498333ba@postgresql.org Backpatch-through: 14-16 |
||
|---|---|---|
| config | ||
| contrib | ||
| doc | ||
| src | ||
| .abi-compliance-history | ||
| .cirrus.star | ||
| .cirrus.tasks.yml | ||
| .cirrus.yml | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| aclocal.m4 | ||
| configure | ||
| configure.ac | ||
| COPYRIGHT | ||
| GNUmakefile.in | ||
| HISTORY | ||
| Makefile | ||
| meson.build | ||
| meson_options.txt | ||
| README | ||
| README.git | ||
PostgreSQL Database Management System ===================================== This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download/ See the file INSTALL for instructions on how to build and install PostgreSQL. That file also lists supported operating systems and hardware platforms and contains information regarding any other software packages that are required to build or run the PostgreSQL system. Copyright and license information can be found in the file COPYRIGHT. A comprehensive documentation set is included in this distribution; it can be read as described in the installation instructions. The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.