Search Postgresql Archives

ERROR: domain domain1 does not allow null values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 welcome...




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux