Re: Checking for string data that makes sense Re: postgresql vs mysql

Поиск
Список
Период
Сортировка
От brian
Тема Re: Checking for string data that makes sense Re: postgresql vs mysql
Дата
Msg-id 45DDAAC2.8070903@zijn-digital.com
обсуждение исходный текст
Ответ на postgresql vs mysql  (gustavo halperin <ggh.develop@gmail.com>)
Список pgsql-general
Zoltan Boszormenyi wrote:
>>>
>>> I would do a CHECK (trim(a) <> '')
>>>
>>>
>>
>> If you were ok with a string consisting soley of whitespace.
>
>
> I meant NOT NULL CHECK(trim(a) <> ''), keeping the context of the
> above example.

Right. I plead that it was late when i replied. I honestly don't know
what i was thinking.

> trim() trims whitespace only from the beginning and the end of the
> strings but not from the middle:
>
> # select trim('   a b c   ');

I realise that. I was thinking of this case:

select trim('        ');

Though, i'm not sure what my point was. Again, it was late. Carry on!

brian

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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: tsearch2: word position
Следующее
От: Markus Schiltknecht
Дата:
Сообщение: Re: tsearch2: word position