Subject: arrays of strings

From: [email-masked]
Date: Tue, 24 Mar 92 20:44:59 -0800

We have a need to store arrays of strings, probably 50 characters in length, which means we
can't use the char16[] type (or does it?).  Is there any way we can do this in
postgres without having to define our own type?

Our C declaration for the type we are trying to store is:

char	term[20][50];

Thanks in advance.

Bryan

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 30 Mar 92 13:48:54 PST

you write:

> We have a need to store arrays of strings, probably 50 characters in length, 
 +which means we
> can't use the char16[] type (or does it?).  Is there any way we can do this i
 +n
> Our C declaration for the type we are trying to store is:

The best you can do without defining your own type is:

	create foo ( a = text[20] )

an array of text.  As you may already know text is a variable length type.

Jeff Meredith
[email-masked]

---

From: Julie Borsack <[email-masked]>
Date: Tue, 31 Mar 92 08:23:58 -0800

>[email-masked]

Unfortunately you can create this type, but for some reason we can't
access any of the items in the array except the first item.  The
retrieve query:

    retrieve (classname.textattr[2])

 is accepted by the backend but never returns.  If you come up with
any other structure or can figure out why this query is giving us
problems, please let us know.

--julie

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 31 Mar 92 10:52:44 PST

> problems, please let us know.

Bug above.  You will have to define your own type for now. Sorry.

Jeff Meredith

---

From: Julie Borsack <[email-masked]>
Date: Tue, 31 Mar 92 08:23:58 -0800

--julie

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 31 Mar 92 10:52:44 PST

Jeff Meredith