From: Thomas Mack <mack@ips.cs.tu-bs.de>
To: pgsql-sql@postgresql.org
Subject: plpgsql function problems
Date: Sat, 3 Jul 1999 12:10:36 +0200 (MET DST)
Message-ID: <199907031010.MAA14486@infbsdb1.idb.cs.tu-bs.de> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mack@ips.cs.tu-bs.de
Subject: Re: plpgsql function problems
In-Reply-To: <199907031010.MAA14486@infbsdb1.idb.cs.tu-bs.de>
References: <199907031010.MAA14486@infbsdb1.idb.cs.tu-bs.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox