Hi, I think I found something that is strange. I can't detect whether i passed a NULL to stored procedure in plpgsql when it happens that I use composites I warn that I haven't read the sql standards though. Here is the code: CREATE TYPE ttype AS ( t1 int, t2 int ); CREATE OR REPLACE FUNCTION ttypetest(t ttype) RETURNS ttype AS $$ BEGIN IF t IS NULL THEN RAISE EXCEPTION 'NULL input'; END IF; RETURN t; END $$ LANGUAGE plpgsql; SELECT ttypetest(NULL); I also find it quite difficult to unset an element from array in postgres. Regards, Peter Filipov