plpgsql function problems

Поиск
Список
Период
Сортировка
От Thomas Mack
Тема plpgsql function problems
Дата
Msg-id 199907031010.MAA14486@infbsdb1.idb.cs.tu-bs.de
обсуждение исходный текст
Список pgsql-sql
I would like to declare some non null variables
in plpgsql functions. When I do so, I always get
an error stating "null assignment to non null
variable" (in this sense). There is not even
an assignment obvious obvious to me:


ib=> CREATE FUNCTION something() RETURNS int4 AS 'DECLARE
ib'> i int4 not null DEFAULT 27;
ib'> BEGIN
ib'> return 0;
ib'> END;
ib'> ' LANGUAGE 'plpgsql';
CREATE
ib=> select something();
ERROR:  NULL assignment to variable 'i' declared NOT NULL
ib=> 


I really can't see the problem. Anybody of you?
(postgres 6.4.2)


(Maybe I should engage myself in the documentation project
if time allows, as according to 'obvious' documentation, this
seems to be fine...)


Thomas Mack
TU Braunschweig, Abt. Informationssysteme


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

Предыдущее
От: blackgr
Дата:
Сообщение: problem creating table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] problem creating table