Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA03039; Mon, 3 Aug 92 11:40:50 -0700
Message-Id: <9208031840.AA03039@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: Postquel functions in Ver 4
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mao@postgres.berkeley.edu
In-Reply-To: Your message of "Mon, 03 Aug 92 09:01:15 PDT."
             <9208031601.AA00886@postgres.Berkeley.EDU> 
Date: Mon, 03 Aug 92 11:40:39 PDT

you write:

> there could be problems with composite objects and unexpected
> results when a user doesnt know the difference
> between these functions (or forgets how they were defined).
> 
> Specify a manager name (single instance function) in a where clause
> and you get the expected reult.
> 
> However the apparently very similar query where you
> specify hobbies name or children name (set of instance function)
> in a where clause and you get no instances returned.
> 
> Ive even got some bizarre results out.

for 4.0.1, i've changed the behavior in the system as follows:  if the
user tries to use an operator (such as '=' or '+'), and if one of the
operands is a set-valued function, then postgres prints a message of the
form

  NOTICE:Aug  3 11:48:31:An operand to the '+' operator returns a set of int4,
  WARN:Aug  3 11:48:31:but '+' takes single values, not sets.

and aborts the transaction.  this provides deterministic, if somewhat
restrictive, behavior.
					mike olson
					project sequoia 2000
					uc berkeley
					mao@cs.berkeley.edu
