CREATE DOMAIN MojaDomena AS INTEGER;
CREATE FUNCTION Suma(MojaDomena, MojaDomena) RETURNS INTEGER
  AS 'SELECT $1::int+$2::int' LANGUAGE SQL;

CREATE OPERATOR + (
leftarg=MojaDomena,
rightarg=MojaDomena,
procedure=Suma,
commutator=+
);
