Re: Rollback when value too long - Mailing list pgsql-general

From Jeff Eckermann
Subject Re: Rollback when value too long
Date
Msg-id 20030516131754.86359.qmail@web20804.mail.yahoo.com
Whole thread Raw
In response to Re: Rollback when value too long  ("Bartlomiej Frackiewicz" <frackiewicz@inity.de>)
List 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 by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: Migration from SQLServer
Next
From: Faizol Halim
Date:
Subject: migrating from Oracle to PostgreSQL