postgresql/src/include
Amit Langote 0f271e8e8d SQL/JSON: Correct jsonpath variable name matching
Previously, GetJsonPathVar() allowed a jsonpath expression to
reference any prefix of a PASSING variable's name. For example, the
following query would incorrectly work:

SELECT JSON_QUERY(context_item, jsonpath '$xy' PASSING val AS xyz);

The fix ensures that the length of the variable name mentioned in a
jsonpath expression matches exactly with the name of the PASSING
variable before comparing the strings using strncmp().

Reported-by: Alvaro Herrera (off-list)
Discussion: https://postgr.es/m/CA+HiwqFGkLWMvELBH6E4SQ45qUHthgcRH6gCJL20OsYDRtFx_w@mail.gmail.com
2024-06-19 15:22:06 +09:00
..
access Fix insertion of SP-GiST REDIRECT tuples during REINDEX CONCURRENTLY. 2024-06-17 14:30:59 -04:00
archive Add macro for customizing an archiving WARNING message. 2024-03-04 15:41:42 -06:00
backup Align blocks in incremental backups to BLCKSZ 2024-04-05 16:30:01 +02:00
bootstrap Update copyright for 2024 2024-01-03 20:49:05 -05:00
catalog Improve tracking of role dependencies of pg_init_privs entries. 2024-06-17 12:55:10 -04:00
commands Reintroduce dead tuple counter in pg_stat_progress_vacuum. 2024-06-14 10:08:15 +09:00
common Harmonize function parameter names for Postgres 17. 2024-06-12 17:01:51 -04:00
datatype Update copyright for 2024 2024-01-03 20:49:05 -05:00
executor Add TupleTableSlotOps.is_current_xact_tuple() method 2024-03-21 23:00:43 +02:00
fe_utils Allow dbname to be written as part of connstring via pg_basebackup's -R option. 2024-03-21 10:50:33 +05:30
foreign Clean up more indent breakage from 6377e12a5. 2024-04-16 13:00:40 -04:00
jit jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
lib Small cosmetic fixes in radix tree template 2024-04-27 14:42:01 +07:00
libpq Harmonize function parameter names for Postgres 17. 2024-06-12 17:01:51 -04:00
mb Inline basic UTF-8 functions. 2024-03-20 09:40:57 -07:00
nodes Restore preprocess_groupclause() 2024-06-06 13:44:34 +03:00
optimizer Fix asymmetry in setting EquivalenceClass.ec_sortref 2024-06-06 13:41:34 +03:00
parser Revert temporal primary keys and foreign keys 2024-05-16 08:17:46 +02:00
partitioning Implement ALTER TABLE ... SPLIT PARTITION ... command 2024-04-07 01:18:44 +03:00
pch Update copyright for 2024 2024-01-03 20:49:05 -05:00
port Add XLogCtl->logInsertResult 2024-04-07 14:06:30 +02:00
portability Update copyright for 2024 2024-01-03 20:49:05 -05:00
postmaster Harmonize function parameter names for Postgres 17. 2024-06-12 17:01:51 -04:00
regex Update copyright for 2024 2024-01-03 20:49:05 -05:00
replication Post-commit review fixes for slot synchronization. 2024-04-25 14:01:44 +05:30
rewrite Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
snowball Update copyright for 2024 2024-01-03 20:49:05 -05:00
statistics Update copyright for 2024 2024-01-03 20:49:05 -05:00
storage Harmonize function parameter names for Postgres 17. 2024-06-12 17:01:51 -04:00
tcop Fix incorrect year in some copyright notices added this year 2024-05-15 15:01:21 +12:00
tsearch Update copyright for 2024 2024-01-03 20:49:05 -05:00
utils SQL/JSON: Correct jsonpath variable name matching 2024-06-19 15:22:06 +09:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Add macro to disable address safety instrumentation 2024-04-06 12:20:40 +07:00
fmgr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
funcapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
getopt_long.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
meson.build meson: Restore implicit warning/debug/optimize flags for extensions 2024-06-07 09:36:26 +02:00
miscadmin.h Remove assertions that some compiler say are tautological 2024-03-20 09:14:51 +02:00
pg_config.h.in Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Introduce a non-recursive JSON parser 2024-04-04 06:46:40 -04:00
pg_getopt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_trace.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtar.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtime.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
port.h Replace calls to pg_qsort() with the qsort() macro. 2024-02-16 11:37:50 -06:00
postgres.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
varatt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
windowapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00