pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: nolan@celery.tssi.com
To: gearond@cvc.net
Cc: xzilla@users.sourceforge.net
Cc: josh@agliodbs.com
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] rewriting values with before trigger
Date: Thu, 24 Apr 2003 16:18:05 -0500 (CDT)
Message-ID: <20030424211805.22526.qmail@celery.tssi.com> (raw)
In-Reply-To: <3EA836AF.8060704@cvc.net>

> OR, deliberately name your triggers with alphanumerical prefixes that 
> forces them to fire in a certain order, and making the trigger that 
> does the conversion fire first?

The SQL 99 standard mandates that triggers fire the order defined, though
the docs say pgsql does it in alphabetical order, possibly because that 
was easier to implement.  

It is probably better to assume that in any given situation they will fire 
in a random order and sequence events yourself when necessary.

That may mean throwing the '' into NULL logic into every trigger for that
table, though there are probably more elegant ways to achieve that result.

If God (or Codd?) had meant us to enable triggers to fire in a particular 
order, there would be a 'firing order nnnn' sequencing parameter in the 
standard.

--
Mike Nolan




view thread (18+ messages)  latest in thread

Message-ID: <20030424211805.22526.qmail@celery.tssi.com>
Permalink:  ../20030424211805.22526.qmail@celery.tssi.com/
Also on:    postgresql.org/message-id/20030424211805.22526.qmail@celery.tssi.com

 · 

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: nolan@celery.tssi.com, gearond@cvc.net, xzilla@users.sourceforge.net, josh@agliodbs.com, pgsql-general@postgresql.org
  Subject: Re: [SQL] rewriting values with before trigger
  In-Reply-To: <20030424211805.22526.qmail@celery.tssi.com>

* 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