Subject: text now OK, how about text[]

From: [email-masked]
Date: Tue, 29 Jun 93 15:27:32 -0700

Hi -- with kind help from several folks I was able to figure
out how to pull text attributes from Postgres instances
into text C data types.  

Now my question is:

how do I pull in arrays of text?  

Or for that matter, how do I pull in arrays of anything?
This is not discussed on page 70 in the reference manual
where the table mapping postgres built-in types to
C types is given.

Lin

---

From: [email-masked] (Paul M. Aoki)
Date: Tue, 29 Jun 93 23:52:32 -0700

> Or for that matter, how do I pull in arrays of anything?

arrays in released versions of postgres are implemented using
struct varlena in the simplest way you can possibly imagine.
look in utils/adt/arrayfuncs.c to see how it's done.  arrays
of variable-length types must be walked by hand.

4.2 will have a much better interface that will be Very
Different, so modularize your array access code.  (no, i'm not 
going to try to describe it in advance.  it's a moving target
at this point.)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki