diff options
author | drh <> | 2023-05-01 03:56:48 +0000 |
---|---|---|
committer | drh <> | 2023-05-01 03:56:48 +0000 |
commit | e210c9390321379f9a5c0b7a205e67128ab12192 (patch) | |
tree | e98e34a89d6793f2f4ef8f253bce556a81bac1e5 /src/json.c | |
parent | 5196d9350556cbd301d7bd89a342a068207a4869 (diff) | |
download | sqlite-e210c9390321379f9a5c0b7a205e67128ab12192.tar.gz sqlite-e210c9390321379f9a5c0b7a205e67128ab12192.zip |
Fix abbreviated paths for objects such that they work even if the object
key begins with '$'.
FossilOrigin-Name: 1b991c78141a9915ae9350ecb347a758e50d7d25c8a0f4cc098ae10d47c27043
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c index 7e112c30d..aae48c291 100644 --- a/src/json.c +++ b/src/json.c @@ -2164,7 +2164,7 @@ static void jsonExtractFunc( zPath = (const char*)sqlite3_value_text(argv[1]); if( zPath==0 ) return; if( flags & JSON_ABPATH ){ - if( zPath[0]!='$' ){ + if( zPath[0]!='$' || (zPath[1]!='.' && zPath[1]!='[' && zPath[1]!=0) ){ /* The -> and ->> operators accept abbreviated PATH arguments. This ** is mostly for compatibility with PostgreSQL, but also for ** convenience. |