2 ms·
I have quite wide records (over 50 fields) and ->> performs not well with text keys. I did not try it with array indexing though: WITH ins AS ( SEL
by bvrmn 3y ago
I have quite wide records (over 50 fields) and ->> performs not well with text keys. I did not try it with array indexing though:
WITH ins AS (
SELECT value ->> 0, value ->> 1, value ->> 2
FROM json_each('[["some", "joe", 10], ["uuid", "sam", 20], ["key", "phil", 30]]')
)
INSERT INTO data (id, name, value)
SELECT * FROM ins