The following bug has been logged online: Bug reference: 2954 Logged by: Sergiy Vyshnevetskiy Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.1 Operating system: FreeBSD-6 stable Description: null is not checked against domain constraints in return clause Details:
#psql = [EMAIL PROTECTED]:5432 test create domain "DInt" as int not null; CREATE DOMAIN #psql = [EMAIL PROTECTED]:5432 test create or replace function test() returns "DInt" immutable strict language plpgsql as $F$begin return null; end$F$; CREATE FUNCTION #psql = [EMAIL PROTECTED]:5432 test select test() is null; ?column? ---------- t (1 запиÑÑ) #psql = [EMAIL PROTECTED]:5432 test We should have gotten an error during execution of test(). ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate