X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F17B09FA5DD for ; Fri, 9 Jun 2006 18:55:16 -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 91234-10 for ; Fri, 9 Jun 2006 18:55:07 -0300 (ADT) X-Greylist: delayed 00:09:41.251854 by SQLgrey- Received: from amanda.contactbda.com (ipn36372-e65122.cidr.lightship.net [216.204.66.226]) by postgresql.org (Postfix) with ESMTP id 944549FA1A8 for ; Fri, 9 Jun 2006 18:55:07 -0300 (ADT) Received: from amanda.contactbda.com (amanda.contactbda.com [192.168.1.2]) by amanda.contactbda.com (8.12.11/8.12.11/Debian-3) with ESMTP id k59LjN2f018228; Fri, 9 Jun 2006 17:45:24 -0400 From: "Jim Buttafuoco" To: "Rommel the iCeMAn" , "PostgreSQL SQL Mailing List" Reply-To: jim@contactbda.com Subject: Re: Problems Testing User-Defined Function Date: Fri, 9 Jun 2006 17:45:23 -0400 Message-Id: <20060609214325.M61129@contactbda.com> In-Reply-To: <000001c68bff$828b5ad0$1264a8c0@theport.com> References: <000001c68bff$828b5ad0$1264a8c0@theport.com> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 192.168.1.1 (jim) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/111 X-Sequence-Number: 25347 You will have to use the "CALLED ON NULL INPUT" option to "create function" (Postgresql 8.1, I don't know about other versions) if you expect NULL arguments. Jim ---------- Original Message ----------- From: "Rommel the iCeMAn" To: "PostgreSQL SQL Mailing List" Sent: Fri, 9 Jun 2006 16:01:26 -0400 Subject: [SQL] Problems Testing User-Defined Function > Hi list, > > I'm a newbie and I have a problem. I've defined the following function using > pgAdmin but I am clueless as to how I can test it. I will eventually be > calling this function from a .NET application but I want to test it using > raw SQL first. Here's the function definition: > > CREATE OR REPLACE FUNCTION sp_insert_manifest(_sender varchar(255), > _sender_email varchar(255), > _reply_to varchar(255), > _filename varchar(255), > _file oid, > _datetime_sent timestamp) RETURNS integer AS $$ > > -- blah blah -- > > $$ LANGUAGE plpgsql; > > I am trying to pass the following values to the function but I have been so > far unsuccessful. > > SELECT sp_insert_manifest('me', me@you.com', 'me@you.com', 'test.txt', NULL, > '2006/06/09') > > Can anyone help me here? > > Thanks, > Rommel the iCeMAn. > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings ------- End of Original Message -------