On 11/22/26 17:11, Matias Kenig wrote:
Would there be interest in something like this? I'm happy to work on a patch
if the approach and the syntax seem reasonable, and I'm open to alternative
naming (e.g. TRIM TRAILING NULLS).

Hi,

I do not really see a value for this, if you want to store sparse data you should pick another format where you store a list of position + value rather than values and nulls, e.g. [[0, 1], [2, 3]] in your example. Trimming away trailing nulls seems like an ugly hack which only gives modest savings on sparse workloads, and a hack I would not wish to see additional syntax in our parser for. Maybe it could be worth adding a jsonb_array_rtrim() function, but I am skeptical against even that.

Best regards,

--
Andreas Karlsson
Percona



Reply via email to