Subject: postgres arrays

From: [email-masked]
Date: Thu, 23 Jan 92 17:18:13 -0800

I am having trouble accessing array elements.  I am using the following class
structure

word (title = char16, document = char16[])

when I try to append to this class using the following command I get a parse error near [

append word (title = "something", document[1] = "something")

any help on this would be much appreciated

Thanks Bryan

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 27 Jan 92 10:53:56 PST

you write:
> when I try to append to this class using the following command I get a parse 
 +error near [
> append word (title = "something", document[1] = "something")

When you want to append to an array attribute you have to specify the entire
array (via an array constant).  For your example:

	append word (title="something", document="{something}")

if you want more than one element in the array list them with 
comma separators:

	append word (title="something", document="{borrowed, something, blue}")

Jeff Meredith
[email-masked]