Re: [HACKERS] update_pg_pwd trigger does not work very well

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] update_pg_pwd trigger does not work very well
Date: 2000-02-28 00:18:22
Message-ID: 200002280018.TAA11340@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Tom Lane writes:
>
> > 1. Since the trigger is executed as soon as a tuple is inserted/
> > updated/deleted, it will write pg_pwd before the transaction is
> > committed. If you then abort the transaction, pg_pwd contains wrong
> > data.
>
> Wow, that implies that every trigger that contains non-database
> side-effects is potentially bogus. That never occured to me. Perhaps (as a
> future plan), it would be a good idea to have deferred triggers as well?
> Now that I think of it, wasn't that the very reason Jan had to invent the
> separate constraint triggers?

Yes! I remember him talking about this. I bet you can just modify your
trigger to be of that type.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-02-28 02:00:35 RE: [HACKERS] Re: ALTER TABLE DROP COLUMN
Previous Message Bruce Momjian 2000-02-28 00:17:08 Re: [HACKERS] Re: ALTER TABLE DROP COLUMN