Re: [HACKERS] array manipulations
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] array manipulations |
Дата | |
Msg-id | 24067.936457703@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | array manipulations (Peter Blazso <blazso@deltav.hu>) |
Список | pgsql-hackers |
Peter Blazso <blazso@deltav.hu> writes: > If you are interested, I could extend its functionality to other types > as well and send this small pack to you. For this, however I should know > more about how Postgres manages types internally... I think it should be possible to make a type-independent version of that code, and if you want to do so it'd be a great extension. How does it look to the user? Something like UPDATE table SET arrayfield = arrayInsert(arrayfield, index, newval) UPDATE table SET arrayfield = arrayDelete(arrayfield, index) I suppose? What do you do about multi-dimensional arrays? One thing a number of people have complained about is that the natural way to extend an array is UPDATE table SET arrayfield[n+1] = newval if arrayfield currently has n entries. The array assignment code ought to handle this case but doesn't. I don't think it would be a huge fix but I haven't looked at the code enough to understand what would need to change. regards, tom lane
В списке pgsql-hackers по дате отправления: