Received: from trends.net (root@clio.trends.ca [209.47.148.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA02356 for ; Sat, 3 Jul 1999 10:55:11 -0400 (EDT) (envelope-from mack@ips.cs.tu-bs.de) Received: from infbssys.ips.cs.tu-bs.de (root@infbssys.ips.cs.tu-bs.de [134.169.32.1]) by trends.net (8.8.8/8.8.8) with ESMTP id GAA23839 for ; Sat, 3 Jul 1999 06:13:07 -0400 (EDT) Received: from infbsdb1.idb.cs.tu-bs.de (infbsdb1.idb.cs.tu-bs.de [134.169.32.131]) by infbssys.ips.cs.tu-bs.de (8.9.1/8.9.1) with ESMTP id MAA28942 for ; Sat, 3 Jul 1999 12:10:36 +0200 From: Thomas Mack Date: Sat, 3 Jul 1999 12:10:36 +0200 (MET DST) Message-Id: <199907031010.MAA14486@infbsdb1.idb.cs.tu-bs.de> To: pgsql-sql@postgresql.org Subject: plpgsql function problems 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