Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA20470; Fri, 18 Dec 92 14:35:44 -0800
Date: Fri, 18 Dec 92 14:35:44 -0800
Message-Id: <9212182235.AA20470@postgres.Berkeley.EDU>
From: jdc@kendrick.cse.nau.edu (John Campbell)
Subject: Member of an array function
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu



In postquel 4.0.1, is there any way to traverse an array?  What I'm 
looking for is some way to do the following:

  create FOO (baz=int4[])
  append FOO (baz = "{1,2,3}")
  append FOO (baz = "{3,6,9,12}")
  append FOO (baz = "{2,4,6,8,10}")

  retrieve (FOO.all) where FOO.baz[*] = 3

Where the '*' states I want to traverse the whole (variable length)
array and see if it contains an instance of 3.  I know I can build
my own "inspect" operator and int4array type, is there any other way?
Is there any way to build a postquel function that cycles over the
variable length index?

I realize sets are not yet supported and might be a more natural data 
type for a "member of" function--but traversing arrays is still useful.

-- 
	John Campbell               John.Campbell@nau.edu
        jdc@sunset.cse.nau.edu      JDC@NAUVAX.UCC.NAU.EDU
