From: | "E(dot)Rodichev" <er(at)sai(dot)msu(dot)su> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | PL/pgSQL - args passing |
Date: | 1999-09-26 03:58:56 |
Message-ID: | 199909260358.HAA27643@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is it possible to pass the NULL value to PL/pgSQL function? More precisely,
I have a function like
CREATE FUNCTION test (text,int4) RETURNS int4 AS '
Begin
...
End;
' LANGUAGE 'plpgsql';
and typical call is
select test('Word',1);
which works fine. But sometimes I need to call this function with
arguments like
select test(NULL,1); or
select test('Word',NULL);
Now such calls lead to
ERROR: typeidTypeRelid: Invalid type - oid = 0
Any ideas?
_________________________________________________________________________
Evgeny Rodichev Sternberg Astronomical Institute
System/Net Admin Moscow State University
email: er(at)sai(dot)msu(dot)su
Phone: 007 (095) 939 2383
Fax: 007 (095) 932 8841 http://www.sai.msu.su/~er
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Higgs | 1999-09-26 05:55:27 | Cannot connect. |
Previous Message | Martin Weinberg | 1999-09-26 02:13:17 | Memory exhausted in AllocSetAlloc() |