Re: [HACKERS] [PATCH] Generic type subscripting

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, David Steele <david(at)pgmasters(dot)net>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Oleg Bartunov <obartunov(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCH] Generic type subscripting
Date: 2021-01-03 19:41:17
Message-ID: CAFj8pRC-bW95n5pfbc8vN2Qk3oOjoCLHtrzg89hztE0JUiq6Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

probably some is wrong still

create table foo(a jsonb);
update foo set a['a'] = '10';
update foo set a['b']['c'][1] = '10';
update foo set a['b']['c'][10] = '10'

WARNING: problem in alloc set ExprContext: req size > alloc size for chunk
0x256dd88 in block 0x256d160
WARNING: problem in alloc set ExprContext: bogus aset link in block
0x256d160, chunk 0x256dd88
WARNING: problem in alloc set ExprContext: req size > alloc size for chunk
0x256dfa0 in block 0x256d160
WARNING: problem in alloc set ExprContext: bogus aset link in block
0x256d160, chunk 0x256dfa0
WARNING: problem in alloc set ExprContext: req size > alloc size for chunk
0x256dfc4 in block 0x256d160
WARNING: problem in alloc set ExprContext: bad single-chunk 0x256dfc4 in
block 0x256d160
WARNING: problem in alloc set ExprContext: bogus aset link in block
0x256d160, chunk 0x256dfc4
WARNING: problem in alloc set ExprContext: found inconsistent memory block
0x256d160
UPDATE 1

and result is wrong, the value of a['b']['c'][1] was overwritten by NULL

Regards

Pavel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-01-04 01:22:20 Re: [HACKERS] Custom compression methods
Previous Message David Fetter 2021-01-03 19:04:16 Re: Implement <null treatment> for window functions