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

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buys
Дата
Msg-id 87mzl59qqg.fsf@stark.xeocode.com
обсуждение исходный текст
Список pgsql-hackers
"Guy Rouillier" <guyr@masergy.com> writes:

> Tino Wildenhain wrote:
> >
> > 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.

A better experiment:

db=> select 'a '::char(3) = 'a  '::char(3);
 ?column?
----------
 t
(1 row)

--
greg

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)