Subject: access to user defined arrays

From: [email-masked] (Chris Plaunt)
Date: Thu, 21 May 92 12:35:28 -0700

Hi,

I can't get access to array elements other than the 0th and 1st.  Have
I missed something fundamental or does it simply not work as it
should?

define type foo ( input = array_in, output = array_out,
	internallength = 0, element = text )

create bar ( textarray = foo ) 

append bar ( textarray = "{"one","two","three","four"}")

retrieve ( bar.textarray[1] )
---------------
| textarray   |
---------------
| one         |
---------------

retrieve ( bar.textarray[2] )
Query sent to backend is "retrieve ( bar.textarray[2] ) "

This query never returns, and often kills the postmaster.  We're
runing Ultrix 4.2 on DECstation with Postgres 3.1.

Thanks, Chris ([email-masked])

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 26 May 92 08:36:56 PDT

> retrieve ( bar.textarray[1] )

This is a known bug in 3.1.  Arrays of variable length types, as well as
arrays of types larger than sizeof(char *) are broken.  I have been lax
in keeping the bug list up to date.  It has been repaired and the fix will
be out with version 4.

Jeff Meredith
[email-masked]