plpgsql function problems
plpgsql function problems
От:
Thomas Mack <mack@ips.cs.tu-bs.de>
Дата:
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