Bugs item #2788876, was opened at 2009-05-08 09:38
Message generated for change (Comment added) made by nielsnes
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2788876&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: MonetDB5 "stable"
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bram [Cronos] (vandabr)
Assigned to: Niels Nes (nielsnes)
Summary: Possible trigger bugs
Initial Comment:
[This is a repost of my message to the monetdb-users mailing list]
I'm experiencing some strange trigger behaviour. Not sure if I'm simply
missing something, or if I've run into a bug.
create table t1 (id serial, toggle boolean);
create table t2 (id serial, ref bigint);
insert into t1 (toggle) values (false);
insert into t1 (toggle) values (false);
create trigger updateMe
after update on t1 referencing new row new_row
for each row when new_row.toggle = true
insert into t2 (ref) values (new_row.id);
update t1 set toggle = true where id = 1;
After this update statement, I would expect to see *1* row in t2.
Instead, I see two rows:
+----+-----+
| id | ref |
+====+=====+
| 1 | 1 |
| 2 | 2 |
+----+-----+
The "when" clause seems to be ignored entirely -- I can change to "when
1 = 0" and it'll still work.
If I change the trigger to
create trigger updateMe
after update on t1 referencing new row new_row
for each row insert into t2 (ref) values (new_row.id);
something equally odd happens. Instead of doing an insert for each
UPDATED row, it inserts a row for each row present in t1. This seems a
bit odd to me, but again, I could just be misunderstand the way this is
supposed to work. Documentation on triggers is a bit sparse I'm afraid...
Any help on this issue would be more than welcome!
----------------------------------------------------------------------
>Comment By: Niels Nes (nielsnes)
Date: 2009-05-13 20:40
Message:
The when 'condition' code is missing as it seems. Implementation will take
some time.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2788876&group_id=56967
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs