Return-Path: owner-postman Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id QAA21125 for postgres-redist; Sun, 26 Jun 1994 16:05:22 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199406262305.QAA21125@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from cs.mtu.edu (cs.mtu.edu [141.219.150.12]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id QAA21115 for ; Sun, 26 Jun 1994 16:05:21 -0700 Received: from werner.mtu.edu (werner.cs.mtu.edu) by cs.mtu.edu (4.1/SMI-4.1) id AA16420; Sun, 26 Jun 94 19:05:20 EDT From: aataneja@cs.mtu.edu (Bruce Taneja.) Message-Id: <9406262305.AA16420@cs.mtu.edu> Subject: retrieving complex types using GetAttributeByname() .. To: postgres@postgres.Berkeley.EDU Date: Sun, 26 Jun 1994 19:05:18 -0400 (EDT) X-Mailer: ELM [version 2.4 PL22] Content-Type: text Content-Length: 1097 Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sun, 26 Jun 94 16:05:22 -0700 Resent-XMts: smtp 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. ==============================================================================