Re: Problem with triggers

From: Adrian von Bidder <avbidder(at)fortytwo(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with triggers
Date: 2010-06-16 04:56:26
Message-ID: 201006160656.32638@fortytwo.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 ...

> 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

--
Or is it?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greig Wise 2010-06-16 05:09:16 Re: GSS Authentication
Previous Message Anton Maksimenkov 2010-06-16 04:26:49 consequent PQsendQueryPrepared() failed: another command is already in progress