Received: from m8.jersey.juno.com (m8.jersey.juno.com [209.67.34.63]) by hub.org (8.10.1/8.10.1) with ESMTP id e5SIPf148225 for ; Wed, 28 Jun 2000 14:25:41 -0400 (EDT) Received: from cookie.juno.com by cookie.juno.com for <"3owL3gh9QC7QjAFftGX2cAbBl4qpw7+mi/k6+p3mnIbQ7hGO+wA6Mw=="> Received: (from norqu2@juno.com) by m8.jersey.juno.com (queuemail) id FBNYEFQK; Wed, 28 Jun 2000 14:24:52 EDT To: pgsql-sql@postgresql.org Date: Wed, 28 Jun 2000 11:27:53 -0700 Subject: plpgsql function gets wierd with Null parameters Message-ID: <20000628.112753.-439695.1.norqu2@juno.com> X-Mailer: Juno 4.0.9 MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Juno-Line-Breaks: 0,2-15,17-35 X-Juno-Att: 0 X-Juno-RefParts: 0 From: Skeets and Kim Norquist X-Archive-Number: 200007/9 When I call the following plpgsql function with the last two parameters as Null, the first parameter loses it's value: ma=> select createFund('fred', null, null); createfund ------------ (1 row) However it works fine when I give values to the last two params: ma=> select createFund('fred', 'joe', 5); createfund ------------ fred (1 row) Here's the function (I've hacked it so that it just returns the first parameter): create function createFund(varchar, varchar, int) returns text as ' DECLARE fundname ALIAS FOR $1; fundsymbol ALIAS FOR $2; fundcusip ALIAS FOR $3; existing varchar(100); fundid int; rec RECORD; retval text; datecount smallint; BEGIN RETURN fundname; ... END; ' language 'plpgsql'; Any ideas? -Skeets Norquist ________________________________________________________________ YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj.