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 VAA17841 for postgres-redist; Sat, 25 Jun 1994 21:42:45 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199406260442.VAA17841@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 VAA17831 for ; Sat, 25 Jun 1994 21:42:44 -0700 Received: from tamarack.mtu.edu (tamarack.cs.mtu.edu) by cs.mtu.edu (4.1/SMI-4.1) id AA14339; Sun, 26 Jun 94 00:42:44 EDT From: aataneja@cs.mtu.edu (Bruce Taneja.) Message-Id: <9406260442.AA14339@cs.mtu.edu> Subject: define FUNCTION .. To: postgres@postgres.Berkeley.EDU Date: Sun, 26 Jun 1994 00:42:43 -0400 (EDT) X-Mailer: ELM [version 2.4 PL22] Content-Type: text Content-Length: 1195 Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Sat, 25 Jun 94 21:42:45 -0700 Resent-XMts: smtp Howdy again !, .. haven't got any response to my previous query yet , and here is another one .. :( ------------- my test function in circle.c : (compiled ok..) bool test(t, char1) TUPLE t; char *char1; { BCIRCLE * bca = (BCIRCLE*) GetAttributeByName(t, "a"); return (char1 == "1") ; /*return +ve if i/p was 1 */ } ------------- and the postgres reaction to it: * define function test (language = "c", returntype = bool) arg is (tutorial, char16) as "/usr/local/postgres/bcircle.o" \g Query sent to backend is "define function test (language = "c", returntype = bool) arg is (tutorial, char16) as "/usr/local/postgres/bcircle.o" " DEFINE Go * retrieve (tutorial.all) where test(tutorial, "0") \g Query sent to backend is "retrieve (tutorial.all) where test(tutorial, "0") " NOTICE:Jun 26 00:33:32:type mismatch in invocation of function test WARN:Jun 26 00:33:32:no such attribute or function test --------------------------- I think postgres does not like the "0" string parameter.. Is there any way to pass strings in "quotes" to your defined function ?? (like my "0" ) ?? ---------------------------- thanks .. 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. ==============================================================================