BUG #2948: default null values for not-null domains - Mailing list pgsql-bugs

From Sergiy Vyshnevetskiy
Subject BUG #2948: default null values for not-null domains
Date
Msg-id 200701311759.l0VHxLtZ028718@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2948: default null values for not-null domains
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2948
Logged by:          Sergiy Vyshnevetskiy
Email address:      serg@vostok.net
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  = serg@[local]: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  = serg@[local]:5432 test
select test() is null;
 ?column?
----------
 t
(1 запись)

#psql  = serg@[local]:5432 test

Last select should have risen an exception:

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

pgsql-bugs by date:

Previous
From: Sergiy Vyshnevetskiy
Date:
Subject: Re: BUG #2945: possibly forgotten SPI_push()/SPI_pop()
Next
From: Sergiy Vyshnevetskiy
Date:
Subject: Re: BUG #2948: default null values for not-null domains