Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA25351; Tue, 31 Mar 92 08:34:24 -0800
Message-Id: <9203311634.AA25351@postgres.Berkeley.EDU>
From: Julie Borsack <jborsack@little-charlie.isri.unlv.edu>
Subject: Re: arrays of strings
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of "Mon, 30 Mar 92 13:48:54 PST."
             <9203302149.AA15468@postgres.Berkeley.EDU> 
Date: Tue, 31 Mar 92 08:23:58 -0800
From: Julie Borsack <jborsack@little-charlie.isri.unlv.edu>

>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
>> postgres without having to define our own type?
>> 
>> Our C declaration for the type we are trying to store is:
>> 
>> char	term[20][50];
>
>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
>mer@postgres.berkeley.edu

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

