Updating Arrays

Поиск
Список
Период
Сортировка
От Bob Pawley
Тема Updating Arrays
Дата
Msg-id 707FB95957B14DB880D259EE0011F29F@BobPC
обсуждение исходный текст
Ответы Re: Updating Arrays  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Hi
 
I exploring the use of arrays.
 
So far I have created a table and inserted a row and updated the row with an array
Update library.compare
  set _base =
  '{2, 0.764149497122068, 4.8886}'
  where process_id = 2;
– successfully.
 
However when I attempt to update a specific element of the array
 
Update library.compare
set _base[2] =
'{2}'
where process_id = 2;
I get an error “invalid input syntax for type numeric: "{2}"”
 
Bob
 
Create table library.compare (
id serial UNIQUE,
process_id int4,
device_id int4,
_base decimal[]
);
Insert into library.compare (process_id)
values ('2');

В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: securing the sql server ?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Updating Arrays