pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: SZŰCS Gábor <surrano@mailbox.hu>
To: pgsql-sql@postgresql.org
Subject: Re: Order of triggers - totally lost
Date: Wed, 13 Aug 2003 19:20:43 +0200
Message-ID: <005a01c361bf$3a1a5d40$0403a8c0@fejleszt4> (raw)
References: <001001c36183$4f636570$0403a8c0@fejleszt4>
	<200308130754.32211.jgardner@jonathangardner.net>
	<003e01c361b1$37d02780$0403a8c0@fejleszt4>
	<200308130920.07619.jgardner@jonathangardner.net>

Dear Jonathan,

thanks for your POV.

----- Original Message ----- 
From: "Jonathan Gardner" <jgardner@jonathangardner.net>
Sent: Wednesday, August 13, 2003 6:20 PM


> I try to avoid triggers unless it is completely obvious what they are
> doing and why I should use them. This tends to minimize the number of
> them hanging around. I am a programmer - python, perl mostly - so the
> logic flow of triggers isn't something I can keep a firm handle on all
> the time.

We prefer using triggers to protect the server as well as client logic and
even wizards (some of them have more than 100 graph vertices and edges) to
help the users avoid illegal operations. In short: double protection.

> My tables only end up with a couple of triggers, if any. I have a ton of

A couple of triggers for most tables, yes. But for over 100 tables, this is
a couple hundred triggers total. Is that what you meant?

> stored procedures lying around, however -- pretty much one for each
> "action" a user would take to modify the database. If a trigger
> triggers another trigger, they aren't dependant on the order thereof,
> or even the existance of the other trigger.
>
> You may also want to examine PostgreSQL's RULE system (CREATE RULE). I
> think some of your triggers may be interchangeable with rules.

You have a point there... not sure I'll have the time to experiment
(we are ordered to make only small changes to be easily commitable to the
in-production version)

G.
------------------------------- cut here -------------------------------




view thread (9+ messages)

Message-ID: <005a01c361bf$3a1a5d40$0403a8c0@fejleszt4>
Permalink:  ../005a01c361bf$3a1a5d40$0403a8c0@fejleszt4/
Also on:    postgresql.org/message-id/005a01c361bf$3a1a5d40$0403a8c0@fejleszt4

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: surrano@mailbox.hu
  Subject: Re: Order of triggers - totally lost
  In-Reply-To: <005a01c361bf$3a1a5d40$0403a8c0@fejleszt4>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox