From: Jim Buttafuoco <jim@contactbda.com>
To: Rommel the iCeMAn <icecrew@gmail.com>
To: PostgreSQL SQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Problems Testing User-Defined Function
Date: Fri, 9 Jun 2006 17:45:23 -0400
Message-ID: <20060609214325.M61129@contactbda.com> (raw)
In-Reply-To: <000001c68bff$828b5ad0$1264a8c0@theport.com>
References: <000001c68bff$828b5ad0$1264a8c0@theport.com>
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" <icecrew@gmail.com>
To: "PostgreSQL SQL Mailing List" <pgsql-sql@postgresql.org>
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 -------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jim@contactbda.com, icecrew@gmail.com
Subject: Re: Problems Testing User-Defined Function
In-Reply-To: <20060609214325.M61129@contactbda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox