Subject: retrieving complex types using GetAttributeByname() ..

From: [email-masked] (Bruce Taneja.)
Date: Sun, 26 Jun 1994 19:05:18 -0400 (EDT)

Gulp !, don't tell me it is not possible to retrieve complex data types
using GetAttributeByName() ...

I was able to compile and run the GetAttributeByName() example of overpaid()
function on the employee table OK ..

but when I do :

-=-=-=-=-=-=-=-=-=-=-=-=-=
bool  test(t, char1)
 TUPLE t;
 char *char1;
{
        extern char *GetAttributeByName();
        CIRCLE  circle;

        circle = (CIRCLE) GetAttributeByName(t, "a");

  return (!strncmp(char1, "1"));
}
-=-=-=-=-=-=-=-=-=-=
on compilation,
the cc complains :
"circle.c", line 87: CAST is not a permitted struct/union operation
"circle.c", line 87: operands of = have incompatible types

-=-=-=-=-=-=-=-=-=-=-=-

so if I can't CAST (CIRCLE) GetAttributeByName  ... then how am I supposed
to retrieve the complex circle type attribute from my tuple t .. ?

PS: The reason the computer was hanging before was because I was trying to
type cast (CIRCLE *) GetAttributeByName    to get the program to compile .. :(
                 ^^^
bad idea ..

help!
Bruce.
--------------------------------------------------------------------------

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================