Search Postgresql Archives

Updating Arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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');

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux