From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | A James Lewis <james(at)fsck(dot)co(dot)uk>, Peter Mount <peter(at)retep(dot)org(dot)uk>, Mathijs Brands <mathijs(at)ilse(dot)nl>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Calling Java from psql (was Re: requesting help) |
Date: | 2001-03-29 19:03:53 |
Message-ID: | Pine.LNX.4.30.0103292049430.2091-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Tom Lane writes:
> I'm generally pretty suspicious of any system design that requires
> calling outside programs from an SQL function. The problem is that
> this fundamentally breaks transactional semantics: if the transaction
> is rolled back after the function call, its effects inside the database
> disappear ... but there's no way to roll back whatever the outside
> program did. Now you have a consistency problem.
The trick here is to organize your outside programs into fairly atomic
chunks and do conservative error logging. The need to synchronize the
non-database world with the database is definitely real. But usually a
regular function call near the end of the transaction block is much more
appropriate than a trigger function.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | Kyle | 2001-03-29 20:02:14 | Possible 7.1RC1 bug |
Previous Message | Jeff Eckermann | 2001-03-29 18:47:32 | RE: serial type; race conditions |