From: Joel Burton <jburton@scw.org>
To: pgsql-general@postgreSQL.org
To: pgsql-sql@postgreSQL.org
Subject: All function parameters become NULL if one is?
Date: Sat, 16 Sep 2000 18:47:35 -0400
Message-ID: <200009162247.e8GMlan28506@olympus.scw.org> (raw)
I have a function that takes two text parameters. If both of these
are non-null, everything works fine. However, if one of these two
parameters is null and one is not, the function receives both as null.
CREATE FUNCTION F(TEXT,TEXT) RETURNS TEXT AS '
BEGIN
RETURN $2;
END;
' LANGUAGE 'plpgsql';
SELECT F(null,'Hello');
returns null.
Is this intentional? Is there a way around this?
--
Joel Burton, Director of Information Systems -*- jburton@scw.org
Support Center of Washington (www.scw.org)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jburton@scw.org, pgsql-general@postgreSQL.org
Subject: Re: All function parameters become NULL if one is?
In-Reply-To: <200009162247.e8GMlan28506@olympus.scw.org>
References: <200009162247.e8GMlan28506@olympus.scw.org>
* 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