ERROR: domain domain1 does not allow null values

From: Юдыцкий Игорь Владиславович <Pitcher(at)gw(dot)tander(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: domain domain1 does not allow null values
Date: 2007-05-31 10:25:16
Message-ID: 465EA28C.3090003@gw.tander.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.
I've found unexpected behavior of PostgreSQL 8.2.3

CREATE DOMAIN "public"."domain1" AS integer NOT NULL;

CREATE TABLE "public"."table1" ("field1" "public"."domain1") WITH OIDS;

CREATE OR REPLACE FUNCTION "public"."function1" () RETURNS text AS
$body$
declare
a public.table1%ROWTYPE;
begin
return 'test';
end;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

Result:
ERROR: domain domain1 does not allow null values
CONTEXT: PL/pgSQL function "function1" line 3 at block variables
initialization

I think it is insane.
Any comments wellcome...

Browse pgsql-general by date

  From Date Subject
Next Message Erwin Moller 2007-05-31 11:01:19 TSEARCH2: disable stemming in indexes and triggers
Previous Message Vincenzo Romano 2007-05-31 10:16:12 stable functions