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 20070222104003.GA13814@zip.com.au
обсуждение исходный текст
Ответ на 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 11:27:18AM +0100, Zoltan Boszormenyi wrote:
> >>I would do a CHECK (trim(a) <> '')
> >
> >Whitespaces are values too, you know.
>
> Yes, I know. But e.g. for a real people name, would you store
> accidentally entered spaces before or after the actual name, too?
> Which would also ruin sorting by name. But of course, it doesn't
> make sense in every case.

Yeah but if you're going down that path then you either trim on the
insert or use a trigger (rule?) to automatically trim your data for
you. Doing it in a check wont do much of anything for you in the case
you describe.

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

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

Предыдущее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: Checking for string data that makes sense Re: postgresql vs mysql
Следующее
От: "Rafa Comino"
Дата:
Сообщение: Esay question, about the numeric format