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 XAA19902 for postgres-redist; Sun, 11 Dec 1994 23:12:28 -0800 Resent-From: POSTGRES mailing list Resent-Message-Id: <199412120712.XAA19902@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 XAA19892 for ; Sun, 11 Dec 1994 23:12:25 -0800 From: SRIRAMK@charlie.usd.edu Date: Mon, 12 Dec 1994 1:13:07 -0600 (CST) To: postgres@postgres.Berkeley.EDU CC: SRIRAMK@charlie.usd.edu Message-Id: <941212011307.14e1@charlie.usd.edu> Subject: Re-sending - could someone please help ? Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sun, 11 Dec 94 23:12:28 -0800 Resent-XMts: smtp From: CHARLI::SRIRAMK 8-DEC-1994 01:50:45.65 To: SMTP%"postgres@postgres.berkeley.edu" CC: SRIRAMK Subj: GetAttributeByName for string values Hi, My function given below * no longer returns an error * after I used the third parameter for GetAttributeByName as suggested in response to my earlier e-mail. However, GetAttributeByName does not display any string attribute values while it successfully does for integer type attributes . Can anybody tell what's wrong ? The following is a simplified example - it is part of a method that returns a bool. /* method_folder.c - to display attribute values */ #include "/home/coyote/postgres/src/backend/tmp/libpq.h" #include #include bool method_folder(t) TUPLE t; { char folder_name[100]; bool isnull; /* Display of a string attribute as below doesn't work */ /* Nothing gets displayed */ printf("Print : %s\n", GetAttributeByName(t,"fldrname",&isnull)); /* Display of an integer attribute with the same syntax as shown below works */ printf("Print cnt: %d\n", (int) GetAttributeByName(t,"msgcnt",&isnull)); } 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 ============================================================================== 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/