"Michael Enke" <michael.enke@wincor-nixdorf.com> writes:
> if I have defined my own data type/operators,
> in a check constraint this type is used
> instead of ::text.
It looks to me like you must have defined an operator =(varchar,testchar)
--- the only way a user-defined type would win over text is to have an
exact match. This is not a good idea. Just define =(text,testchar)
and leave it to the implicit coercion code to handle varchar.
regards, tom lane