Re: BUG #3659: should use implizit type cast in check constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Enke" <michael(dot)enke(at)wincor-nixdorf(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3659: should use implizit type cast in check constraint
Date: 2007-10-08 15:57:40
Message-ID: 21019.1191859060@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Michael Enke" <michael(dot)enke(at)wincor-nixdorf(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2007-10-08 18:01:30 Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field
Previous Message Kevin Grittner 2007-10-08 15:55:33 Re: BUG #3657: Performance leaks when using between of two equal dates