Return-Path: aoki
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA25244; Sun, 22 Aug 93 17:33:37 -0700
Message-Id: <9308230033.AA25244@postgres.Berkeley.EDU>
From: aoki@postgres.berkeley.edu (Paul M. Aoki)
Subject: Re: 3 Quests
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Tue, 17 Aug 93 15:03:29 MESZ 
	     <9308171250.AA25475@postgres.Berkeley.EDU> 
Date: Sun, 22 Aug 93 17:42:45 -0700
Sender: aoki@postgres.Berkeley.EDU
X-Mts: smtp

Wolf Guddat <guddat@faps.uni-erlangen.de> writes:
> Q1: "Each new class name is automatically created as a type"
>      I'm not able to create a class which has an attribute of such
>      a complex type. (e.g MYCLASS (att1=ANOTHERCLASS) )

this kind of complex types were implemented as demoware in 3.1 that
broke in 4.0.  you can still do complex types in 4.0.1 and 4.1 using 
postquel functions.  carol paxson has just finished a better 
implementation for 4.2/5.0/whatever-marc-decides-to-call-it..

> Q2: Using attributes of type "postquel"
>     I know that this isn't running now. I read some short message about
>     regproc.

carol implemented procedural set support, which means working complex 
types plus procedural definition of sets.  i think this is basically what 
you're asking about.

> Q3: If i do an append to a class and i do not specify all attributes then 
>     these attributes do not have a value (the monitor tells me "(null)").
>     Is it possible to return this special "null-value" from 
>     a user defined function and how is it implemented?

actually, the "(null)" from monitor comes from printf trying to 
dereference a null char * :-P  but that's a side issue.

you can determine whether an attribute in a tuple is null using the 
ISNULL/NOTNULL keywords.  this is the only use of null that you should
expect to work consistently.

how a null value is returned from a user-defined function is a different
bag of worms.  for example.  several types that are passed by reference
indicate null using NULL pointers.  fine.  but on many machines there 
are no bit patterns that are invalid integers, so how do you represent
null integers?  it depends on your user-defined type.

so the short answer is, with the exception of null attributes, it depends 
on how you defined your data type.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
