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

Поиск
Список
Период
Сортировка
От CaT
Тема Re: Checking for string data that makes sense Re: postgresql vs mysql
Дата
Msg-id 20070222093932.GH3107@zip.com.au
обсуждение исходный текст
Ответ на Checking for string data that makes sense Re: postgresql vs mysql  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Ответы Re: Checking for string data that makes sense Re: postgresql vs mysql  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Список pgsql-general
On Thu, Feb 22, 2007 at 09:13:13AM +0100, Zoltan Boszormenyi wrote:
> Chris ?rta:
> >CaT wrote:
> >>On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote:
> >>>create table a(a text not null check (char_length(a) > 0));
> >>
> >>What's wrrong with using
> >>
> >>a <> ''
> >
> >Nothing, I just thought of the other way first :)
>
> I would do a CHECK (trim(a) <> '')

Whitespaces are values too, you know.

--
    "To the extent that we overreact, we proffer the terrorists the
    greatest tribute."
        - High Court Judge Michael Kirby

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

Предыдущее
От: brian
Дата:
Сообщение: Re: Checking for string data that makes sense Re: postgresql vs mysql
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: postgresql vs mysql