X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 09E5E9FB308; Wed, 9 Aug 2006 23:36:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 37708-06; Wed, 9 Aug 2006 23:36:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 33D5A9FB2D5; Wed, 9 Aug 2006 23:36:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from ns2.instrumentalyst.com (blk-222-55-203.eastlink.ca [24.222.55.203]) by svr4.postgresql.org (Postfix) with ESMTP id E36585AF884; Thu, 10 Aug 2006 02:36:27 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by ns2.instrumentalyst.com (Postfix) with ESMTP id F3F4B946; Wed, 9 Aug 2006 23:31:43 -0300 (ADT) X-Virus-Scanned: amavisd-new at instrumentalyst.com Received: from ns2.instrumentalyst.com ([127.0.0.1]) by localhost (ns2.instrumentalyst.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8pb9iA8jBJ6E; Wed, 9 Aug 2006 23:31:41 -0300 (ADT) Received: from [192.168.2.7] (pool-71-101-238-15.tampfl.dsl-w.verizon.net [71.101.238.15]) by ns2.instrumentalyst.com (Postfix) with ESMTP id CB47E61E; Wed, 9 Aug 2006 23:31:40 -0300 (ADT) Message-ID: <44DA9BA3.2020801@productivitymedia.com> Date: Wed, 09 Aug 2006 22:36:19 -0400 From: PostgreSQL Admin User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: Lista PG-PHP Cc: pgsql-sql@postgresql.org Subject: PL/pgSQL and PHP 5 References: <20060731041644.32247.qmail@web56610.mail.re3.yahoo.com> <7F7548C8-249E-44E2-8205-6C055671DA19@pgedit.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/7 X-Sequence-Number: 3578 I'm having this problem inserting data from my form using PL/pgSQL. Here is the simplified version of my table and function (this example does not work, also ): CREATE TABLE theirry.sample ( staff_id serial PRIMARY KEY NOT NULL, firstname varchar(100), lastname varchar(150), username varchar(35), identifier varchar(40), address2 varchar(180), activated boolean, activated_keys varchar(32) ); CREATE OR REPLACE FUNCTION insert_staff_b (insert_firstname varchar) RETURNS VOID AS $$ DECLARE BEGIN INSERT INTO theirry.sample (firstname) VALUES (insert_firstname); RETURN; END; $$ LANGUAGE plpgsql; I have a form with a value firstname then call the query in php select insert_staff_b('$_POST['firstname']::varchar) Still I get this error: Warning: pg_query(): Query failed: ERROR: function insert_staff_b(character varying) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. Suggestions or maybe a place to read up on this problem. Thanks in advance, J