Re: Referential integrity doesn't work?

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Manuel Cano Muñoz <manuel(at)adai-it(dot)com>, Lista de PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Referential integrity doesn't work?
Date: 2002-08-01 21:04:58
Message-ID: Pine.LNX.4.21.0208012158440.2710-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 1 Aug 2002, Robert Treat wrote:
>
> ...
> I tried to duplicate your findings and two things of note occured.
> First, on postgres 7.2 your function actualiza_cuenta() doesn't seem to
> execute properly, which causes any inserts to fail by throwing an error.
> This begs the question of what version your running...

I forgot to mention I tried the script having commented out the function and
trigger because I didn't have pl/pgsql loaded in the database I was using for
it.

However, the mention of the function failing raises a question for me. I don't
think I've seen this in the documentation, my apologies if it's there or a
blindingly obvious fact, so does the trigger get run if I do something like:

BEGIN;
INSERT INTO mytable VALUES (...);
CREATE TRIGGER mytrigger BEFORE INSERT OR UPDATE ON mytable blah, blah, blah...
COMMIT;

I would have said not but Robert's comment seems to be saying it is.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2002-08-01 21:07:12 Re: Referential integrity doesn't work?
Previous Message Stephen Bacon 2002-08-01 21:03:55 Re: Restore killing the backend - solved