updating elements of an array which is part of a composite type?

From: "Celia McInnis" <celia(at)drmath(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: updating elements of an array which is part of a composite type?
Date: 2005-06-01 14:54:38
Message-ID: 20050601143613.M49013@drmath.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

How do I update the elements of an array when the array is part of a
composite type?

If I type:

update mytable set (mytype).myarray[1]='whatever' where ...;

I get :

ERROR: syntax error at or near "(" at character ...

indicating that the first bracket is not acceptable.

I have no trouble selecting via:

select (mytype).myarray[1] from mytable;

Thanks for any help.
Celia McInnis

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andrew Hammond 2005-06-01 15:08:06 Re: Functions
Previous Message David Norris 2005-06-01 14:19:06 Novice question: PostgreSQL 7.2.4 running on RedHat linux