agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Eric de Jonge <ejonge@tpd.TNO.NL>
To: post list <postgres@postgres.Berkeley.EDU>
Subject: TRANSACTION II !
Date: Fri, 24 Jun 1994 08:40:00 +0200 (MET DST)
Message-ID: <9406240640.AA02997@tpdbbs.local> (raw)

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: ejonge@tpd.tno.nl _/ 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 "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



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: postgres@postgres.berkeley.edu
  Cc: ejonge@tpd.TNO.NL
  Subject: Re: TRANSACTION II !
  In-Reply-To: <9406240640.AA02997@tpdbbs.local>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox