Re: Rollback when value too long

Поиск
Список
Период
Сортировка
От Jeff Eckermann
Тема Re: Rollback when value too long
Дата
Msg-id 20030516131754.86359.qmail@web20804.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Rollback when value too long  ("Bartlomiej Frackiewicz" <frackiewicz@inity.de>)
Список pgsql-general
--- Bartlomiej Frackiewicz <frackiewicz@inity.de>
wrote:
> Hi,
>
> thanks for answering. Sure Perl can (handmade, DBI
> do not support this, or i am blindly), but i was in
> hope that i can solve this with the DB.

You can do this with a "before" trigger.  IIRC, the
data type is checked before the trigger is executed,
so you would need to change the datatype to something
allowing unlimited length: plain varchar (no length
specification), or text.

I agree with the other posters, though.  This would be
trivial to do in the application, and that is what I
would choose.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: Re: Migration from SQLServer
Следующее
От: Faizol Halim
Дата:
Сообщение: migrating from Oracle to PostgreSQL