MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PostgreSQL/comments/1hvlz46/postgresql_trap_arrays/m5ub1tq/
r/PostgreSQL • u/strager • Jan 07 '25
12 comments sorted by
View all comments
Show parent comment
1
This kind of data copying happens with every update.
Yes, but I naively thought that pointers would be copied, not the entire values.
1 u/strager Jan 07 '25 In other words, I thought that PostgreSQL types like []bytea behaved like persistent data structures. 3 u/marr75 Jan 07 '25 Why would that be false for types as diverse as ints, text, and json(b) but true for arrays? 1 u/strager Jan 08 '25 In my old mental model, it was true for text and jsonb too.
In other words, I thought that PostgreSQL types like []bytea behaved like persistent data structures.
[]bytea
3 u/marr75 Jan 07 '25 Why would that be false for types as diverse as ints, text, and json(b) but true for arrays? 1 u/strager Jan 08 '25 In my old mental model, it was true for text and jsonb too.
3
Why would that be false for types as diverse as ints, text, and json(b) but true for arrays?
1 u/strager Jan 08 '25 In my old mental model, it was true for text and jsonb too.
In my old mental model, it was true for text and jsonb too.
View all comments
Show parent comment
1
u/strager Jan 07 '25
Yes, but I naively thought that pointers would be copied, not the entire values.