agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Bruce Taneja. <aataneja@cs.mtu.edu>
To: postgres@postgres.Berkeley.EDU
Subject: retrieving complex types using GetAttributeByname() ..
Date: Sun, 26 Jun 1994 19:05:18 -0400 (EDT)
Message-ID: <9406262305.AA16420@cs.mtu.edu> (raw)
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 "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aataneja@cs.mtu.edu
Subject: Re: retrieving complex types using GetAttributeByname() ..
In-Reply-To: <9406262305.AA16420@cs.mtu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox