Return-Path: aoki
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA15553; Fri, 9 Jul 93 14:33:15 -0700
Message-Id: <9307092133.AA15553@postgres.Berkeley.EDU>
From: aoki@postgres.berkeley.edu (Paul M. Aoki)
Subject: Re: searching in arrays
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Fri, 9 Jul 93 04:49:53 -0700 
	     <9307091149.AA10592@postgres.Berkeley.EDU> 
Date: Fri, 09 Jul 93 14:37:24 -0700
Sender: aoki@postgres.Berkeley.EDU
X-Mts: smtp

Ludger Becker <ludger@math.uni-muenster.de> writes:,
> One attribute describes (as char16[]) the aliases for each computer 
> (e.g. "{"goedel","mailhost","math","finger"}"). Which query must be used 
> to find the entry for a computer having an alias name matching a given 
> name or regular expression (e.g. find the computer having alias "math")?

postquel has no notion of array index range variables
(e.g., "retrieve (comp.name) where comp.alias[i] = "math"").
you would have to write a user-defined function in C that walks 
the array and does the search.  that, or unroll the test:
	retrieve (comp.name) where 
			comp.alias[1] = "math" or
			comp.alias[2] = "math" or
			...
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
