X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 360D0D1D587 for ; Tue, 2 Dec 2003 21:55:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 01981-09 for ; Tue, 2 Dec 2003 17:54:50 -0400 (AST) Received: from stamp.musicrebellion.com (stamp.musicrebellion.com [63.170.191.108]) by svr1.postgresql.org (Postfix) with ESMTP id 79155D1B432 for ; Tue, 2 Dec 2003 17:54:44 -0400 (AST) Received: from adsl-66-73-138-22.dsl.ipltin.ameritech.net ([66.73.138.22] helo=musicrebellion.com) by stamp.musicrebellion.com with esmtp (Exim 3.35 #1 (Debian)) id 1ARITm-0001M2-00 for ; Tue, 02 Dec 2003 16:54:46 -0500 Message-ID: <3FCD0A0D.1050502@musicrebellion.com> Date: Tue, 02 Dec 2003 16:54:21 -0500 From: Kris Kiger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Sending a libpq C function variables through function call References: <20031202195830.54576.qmail@web21407.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/14 X-Sequence-Number: 11522 Hi all, I've got a function in PG set up, the libpq C call goes like this: PERFORM funcName(''t1'', ''t2'', ''t3'', ''t4'', NEW.someInteger, NEW.someBoolean) funcName looks like this: create function funcName(text, text, text, text, int, boolean) returns int as '/var/lib/postgres/CfileName.so', 'CfunctionName' language 'C'; the C function header accepts each of these arguments as CfunctionName(char* name1, char* name2, char* name3, char* name4, int variable1, bool variable2). When I try to grab a value, say from name1, I get nothing. So, for some reason parameters are not being passed. I'm not sure if there is a good way to pass parameters through libpq, or will I have to use something like SPI to grab them? Use of libpq is preferable, but not absolute. I appreciate the input! Kris