Search Postgresql Archives

Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] Oracle buys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tino Wildenhain wrote:

>>>> 
>>>> Then we are broken too :)
>>>> 
>>>> # select 'a ' = 'a  ';
>>>>   ?column?
>>>> ----------
>>>>   f
>>>> (1 row)
> 
> 
> experiment=# SELECT 'a '::char = 'a  '::char;
>  ?column?
> ----------
>  t
> 

This does't show anything useful, because the ::char casting simply
takes the first char of any string:

select 'abc'::char = 'axy'::char

Also results in 'true'.  Hopefully no one in this discussion would want
those two strings to be equal.

-- 
Guy Rouillier


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux