Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA08652; Tue, 21 Apr 92 08:25:04 -0700
Message-Id: <9204211525.AA08652@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: string arrays
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Fri, 17 Apr 92 11:56:59 PDT."
             <9204171856.AA04813@postgres.Berkeley.EDU> 
Date: Tue, 21 Apr 92 08:24:54 PDT

you write:

> I've been trying to define a string array type - without much success
> 
> I've looked at the documentation for the define circle type - but
> still don't understand how all the values in a single array for a
> record can be returned.
> 
> 
> The C declaration for the type I'm trying to store is :
> 
> char str[15][20];
> 
> Has anyone managed to define a type for text string arrays, if so I'd
> be very happy to hear from you ?

There are some array bugs in 3.1 that have been fixed and will be released
with the next version (in June).  One of the fixes includes a problem with
text arrays.  The way I would normally recommend defining the above structure
is

	define foo (str = text[15])

alternatively you could define a char20 adt and do:

	define foo (str = char20[15])

Unfortunately I think there was a bug fix for this type of array definition
as well... (i.e. arrays of adt's bigger than 4 bytes).

Jeff Meredith
mer@postgres.berkeley.edu
