Re: Rollback when value too long

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Bartlomiej Frackiewicz <frackiewicz(at)inity(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Rollback when value too long
Date: 2003-05-16 13:17:54
Message-ID: 20030516131754.86359.qmail@web20804.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- Bartlomiej Frackiewicz <frackiewicz(at)inity(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Faizol Halim 2003-05-16 13:28:40 migrating from Oracle to PostgreSQL
Previous Message Jeff Eckermann 2003-05-16 13:14:06 Re: Migration from SQLServer