PL/pgSQL - args passing

Поиск
Список
Период
Сортировка
От E.Rodichev
Тема PL/pgSQL - args passing
Дата
Msg-id 199909260358.HAA27643@ra.sai.msu.su
обсуждение исходный текст
Список 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@sai.msu.su
Phone: 007 (095) 939 2383
Fax:   007 (095) 932 8841                       http://www.sai.msu.su/~er

В списке pgsql-general по дате отправления:

Предыдущее
От: Martin Weinberg
Дата:
Сообщение: Memory exhausted in AllocSetAlloc()
Следующее
От: "Andrew Higgs"
Дата:
Сообщение: Cannot connect.