Re: Checking for string data that makes sense Re: postgresql vs mysql
В списке pgsql-general по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера