Subject: TRANSACTION II !

From: [email-masked] (Eric de Jonge)
Date: Fri, 24 Jun 1994 08:40:00 +0200 (MET DST)

AND AGAIN :-) TAKE SOME NOTICE!

Hi,

I've a problem:

I want to add an attribute and define a rule whithin a TRANSACTION
(execute everything or nothing)

FOR EXAMPLE:

ejonge@tpdbbs> monitor testdb
Welcome to the POSTGRES terminal monitor

Go
* \i test

Query sent to backend is "retrieve (tabel.all)"
---------------
| fieldA      |
---------------

====> BEGIN TRANSACTION <======

Query sent to backend is "begin"
BEGIN
Query sent to backend is "addattr (fieldX=IMAGEOBJ) to tabel"
ADD
Query sent to backend is "retrieve (tabel.all)"
-----------------------------
| fieldA      | fieldX      |
-----------------------------

Query sent to backend is "define rule imd_tabefieldX is on delete to tabel 
do delete db_image where current.fieldX = db_image.path "
DEFINE
Query sent to backend is "end"
END

====> END TRANSACTION <======

Query sent to backend is "retrieve (tabel.all)"
-----------------------------
| fieldA      | fieldX      |
-----------------------------

(EVERYTHING'S OK; BUT NOW AGAIN)

====> BEGIN TRANSACTION <======

Query sent to backend is "begin"
BEGIN
Query sent to backend is "addattr (fieldY=IMAGEOBJ) to tabel"
ADD
Query sent to backend is "retrieve (tabel.all)"
-----------------------------
| fieldA      | fieldX      | <==== NO fieldY :-< ==
-----------------------------

Query sent to backend is "define rule imd_tabefieldY is on delete to tabel 
do delete db_image where current.fieldY = db_image.path "
WARN:Jun 20 12:26:07:Invalid attribute fieldY

=================================================
====> PROBLEM:

FIELDY ISN'T ADD (SO CAN'T DEFINE A RULE)

(Paul Oaki: sometimes buffers for dead databases just don't flush out of
the buffer cache.  haven't got a clue as to what causes it. :-( )

Thanks in advance,
-- 
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Eric de Jonge               _/ Phone: +31 15-692225                  _/
_/ TNO-TPD SV                 _/ Fax: +31 15-692111                     _/
_/                           _/ P.O.Box 155                            _/
_/ Email: [email-masked] _/ 2600 AD Delft, The Netherlands         _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_//_/_/_/_/_/_/

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================