The following bug has been logged online:

Bug reference:      2948
Logged by:          Sergiy Vyshnevetskiy
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.2.1
Operating system:   FreeBSD-6 stable
Description:        default null values for not-null domains
Details: 

create domain "DInt4" as int not null;
CREATE DOMAIN
#psql  = [EMAIL PROTECTED]:5432 test
create or replace function test() returns "DInt4" immutable strict language
plpgsql as $F$declare t "DInt4"; begin return t; end$F$;
CREATE FUNCTION
#psql  = [EMAIL PROTECTED]:5432 test
select test() is null;
 ?column? 
----------
 t
(1 запись)

#psql  = [EMAIL PROTECTED]:5432 test

Last select should have risen an exception:

ERROR:  variable "t" declared NOT NULL cannot default to NULL

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to