From: | Sid <sid(dot)the(dot)technician(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with triggers |
Date: | 2010-06-16 05:26:27 |
Message-ID: | AANLkTik77tXXUsjPwM9_PZlOSh1e3CLLSgr0B8jTSm7_@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2010/6/16 Adrian von Bidder <avbidder(at)fortytwo(dot)ch>
> Heyho!
>
> On Wednesday 16 June 2010 00.56:14 Adrian Klaver wrote:
> > > My question is: why do I get information about too long value before
> > > trigger fires?
> > > Can I change this behavior?
>
> I firmly feel friendly error messages like this firmly beong into the
> application and not into the DB. Next thing you'll want translated
> messages
> as well, and your triggers become so complex that you don't wnat to
> maintain
> them ...
>
> My plan was to keep as much as possible of the application logic on the
database side.
Triggers were not so complex, because I used one trigger function for many
tables (http://wiki.postgresql.org/wiki/PL/pgSQL_Dynamic_Triggers),so
printing user friendly information about null values was just one line.
> > The database is beating you to the validation.
>
> With triggers. A question to the experts: Couldn't this, in theory, be
> implememnted within the rules system? From what I understand they are run
> right after the query is parsed; I'd expect data validation to come a bit
> later. Not sure if this is right.
>
> cheers
> -- vbi
>
>
--
Best regards
Sid
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2010-06-16 05:27:19 | Re: Ideal Disk recommendation for PostgreSQL |
Previous Message | Sid | 2010-06-16 05:17:12 | Re: Problem with triggers |