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

Reply via email to