pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefan Weiss <spaceman@foo.at>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: A transaction in transaction? Possible?
Date: Thu, 11 Nov 2004 20:31:27 +0100
Message-ID: <200411112031.27766.spaceman@foo.at> (raw)
In-Reply-To: <4193217C.9080900@bigfoot.com>
References: <Pine.LNX.4.44.0411101256590.6883-100000@matrix.gatewaynet.com>
	<200411102236.41971.spaceman@foo.at>
	<4193217C.9080900@bigfoot.com>

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



view thread (18+ messages)

Message-ID: <200411112031.27766.spaceman@foo.at>
Permalink:  ../200411112031.27766.spaceman@foo.at/
Also on:    postgresql.org/message-id/200411112031.27766.spaceman@foo.at

 · 

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: spaceman@foo.at, mendola@bigfoot.com
  Subject: Re: A transaction in transaction? Possible?
  In-Reply-To: <200411112031.27766.spaceman@foo.at>

* 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