Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id TAA09001 for postgres-redist; Sat, 26 Nov 1994 19:08:48 -0800 Resent-From: POSTGRES mailing list Resent-Message-Id: <199411270308.TAA09001@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from charlie.usd.edu (charlie.usd.edu [192.55.228.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id TAA08991 for ; Sat, 26 Nov 1994 19:08:43 -0800 From: SRIRAMK@charlie.usd.edu Date: Sat, 26 Nov 1994 21:09:16 -0600 (CST) To: postgres@postgres.Berkeley.EDU CC: SRIRAMK@charlie.usd.edu Message-Id: <941126210916.195e4@charlie.usd.edu> Subject: Error in using GetAttributeByName in a function Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sat, 26 Nov 94 19:08:48 -0800 Resent-XMts: smtp Hi postgressers, My function given below doesn't work. /* method_folder.c - to retrieve tuples with fldrname = "DEFAULT" */ #include "/home/coyote/postgres/src/backend/tmp/libpq.h" #include #include bool method_folder(t) TUPLE t; { char folder_name[100]; strcpy(folder_name, (char *) GetAttributeByName(t,"fldrname")); printf ("FOLDER NAME %s\n",folder_name); if (!(strcmp(folder_name,"DEFAULT"))) return (1); else return (0); } I used the following command to define the function : define function method_folder (language = "c", returntype = bool) arg is (FOLDERS) as "/home/coyote/postgres/final/method_folder.o" \g I ran the function with the command : retrieve (FOLDERS.all) where method_folder(FOLDERS) \g The error message I get is : Welcome to the C POSTGRES terminal monitor Go * Query sent to backend is "retrieve (FOLDERS.all) where method_folder(FOLDERS) " WARN:Nov 26 20:44:22:GetAttributeByName: a NULL isNull flag was passed sed Go Any suggestions would be appreciated. Thanks, Sriram Kal. ============================================================================== 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. ============================================================================== URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/