Re: A transaction in transaction? Possible?

From: Stefan Weiss <spaceman(at)foo(dot)at>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: A transaction in transaction? Possible?
Date: 2004-11-11 19:31:27
Message-ID: 200411112031.27766.spaceman@foo.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thursday, 11 November 2004 09:23, Gaetano Mendola wrote:
> Stefan Weiss wrote:
> > These tables are connected by foreign keys, but without "on delete"
> > triggers.
>
> Why "without" ? Are you looking to solve a problem introduced by
> yourself ?

There are numerous checks involved before a customer (or a contact)
can be deleted, and not all of these checks can be done by querying
the database. Sometimes triggers aren't enough.

> You can handle this task using the new functionality introduced with
> savepoint: the exception. For more information look at:
> http://candle.pha.pa.us/main/writings/pgsql/sgml/plpgsql-control-structures
>.html#PLPGSQL-ERROR-TRAPPING

The "delete contact" and "delete customer" functions are not stored
procedures, so I'm not sure how this can help.

thanks,
stefan

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Berg 2004-11-12 03:15:21 Cascade updates wait until the end of the transaction?
Previous Message David B 2004-11-11 19:29:22 Re: Unicode problem inserting records - Invalid UNICODE character