"Michael Paesold" <[EMAIL PROTECTED]> writes: > It seems that when comparing char with text, the comparision is done > as text, not as bpchar.
Yup. Arguably this is a bad idea: the system ought to reject the comparison entirely, and make you cast one side or the other so that it's clear to all concerned which comparison semantics you want. However, I don't see any way to do that without also breaking a lot of cases that are convenient and don't confuse anyone ... like, say, the fact that you can apply upper() to char(n) data in the first place. Upper is declared as "upper(text) returns text". You might care to read the User's Guide's discussion of type conversion, http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/typeconv.html The particular behavior at hand emerges from the fact that text is considered the preferred datatype in the string category. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])