Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On Jun 7, 2005, at 6:03 PM, Richard Huxton wrote: >> If you ask me (and it's too late to back out now :-) the whole >> behaviour of CHAR(n) is wrong, broken and just a bad idea. > Just a quick addition: AFAIK, this bad, broken behavior (I definite

Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Michael Glaesemann
On Jun 7, 2005, at 6:03 PM, Richard Huxton wrote: If you ask me (and it's too late to back out now :-) the whole behaviour of CHAR(n) is wrong, broken and just a bad idea. Just a quick addition: AFAIK, this bad, broken behavior (I definitely agree!) is per SQL spec. :( Don't know about th

Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Richard Huxton
Ilja Golshtein wrote: Hi! I came across following difference between "LIKE" and "=" regarding CHARs and VARCHARs create table aa(f5 char(5), fv varchar(5)); insert into aa values('str1', 'str1'); select count(*) from aa where f5 = fv; 1 select count(*) from aa where f5 like fv; 0 I unde