Re: Updating Arrays - Mailing list pgsql-general

From Bob Pawley
Subject Re: Updating Arrays
Date
Msg-id 0AC12FCDAF7A4092A2429B599D1884E4@BobPC
Whole thread Raw
In response to Re: Updating Arrays  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Updating Arrays
Re: Updating Arrays
List pgsql-general
I'm not sure what you mean.

_base -- not base -- is the column name.

Bob

-----Original Message-----
From: Merlin Moncure
Sent: Monday, August 22, 2011 11:03 AM
To: Bob Pawley
Cc: Postgresql
Subject: Re: [GENERAL] Updating Arrays

On Mon, Aug 22, 2011 at 12:54 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> 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}"”

try "set base[2]  = 2"

merlin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: Courtin Olivier
Date:
Subject: SETOF anyelement - get_call_result_type
Next
From: Merlin Moncure
Date:
Subject: Re: Updating Arrays