| От | Ryan Mahoney |
|---|---|
| Тема | integer[] Update Questions |
| Дата | |
| Msg-id | 1030113582.31478.127.camel@dhcp-224-12 обсуждение |
| Ответы |
Re: [GENERAL] integer[] Update Questions
|
| Список | pgsql-hackers |
Greeting Hackers! Had some questions about integer array type...
If I have a integer[] field in a table, which already has the values
{1,2,3,6,17} and I additionally want to add the value '45' to this
array, is there any easier way than SELECTing the current values and
then updating the entire record?
I see that I could do:
UPDATE table SET array_field[6] = 45 WHERE ...
But how do I know that 6 is the correct index without first SELECTing
all the data?
Is there an array push/pop function? Is there a method of counting the
number of integers in an array?
Thanks for any help you can provide - indexable integer arrays are an
incredible feature, thanks for the hard work!
Ryan Mahoney
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера