Re: Add a check an a array column

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Add a check an a array column
Дата
Msg-id k2huvj$cmj$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Add a check an a array column  (Bret Stern <bret_stern@machinemanagement.com>)
Ответы Re: Add a check an a array column  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-general
Bret Stern wrote on 08.09.2012 22:18:
> A better place for validation is in the front-end, before
> adding/attempting to add data to the db (my opinion).
> Nice to see there are always other ways though.
>

I beg to differ: every validation that can be enforced by declarative constraints *should* be checked there.

As a wise man once said: your application won't be the last one to use the data and it won't be the only one.
And most of the data that is of any interest lives a lot longer than the application(s).

Nowaday it's not uncommon that multiple applications read and write to the same database and in that case you simply
cannot rely on all of them to validate the data.

Thomas

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

Предыдущее
От: vdg
Дата:
Сообщение: Re: Add a check an a array column
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Add a check an a array column