[MonetDB-users] strange trigger behaviour

Hi guys, I have created a table named users: CREATE TABLE names ( name VARCHAR(255) NOT NULL ); another table named names2 which is same as users. only table names are different. I have created a after insert trigger like this: CREATE TRIGGER trg_names_ai AFTER INSERT ON names REFERENCING NEW ROW AS new_row FOR EACH ROW WHEN new_row.name = '<some name>' INSERT INTO names2 VALUES(new_row.name); The problem is it doesn't care about WHEN clause. Any INSERT query will appear in names2. Can anyone help?

On Wed, May 16, 2012 at 12:20:15AM -0700, Majid Azimi wrote:
Hi guys,
I have created a table named users: CREATE TABLE names ( name VARCHAR(255) NOT NULL );
another table named names2 which is same as users. only table names are different. I have created a after insert trigger like this:
CREATE TRIGGER trg_names_ai AFTER INSERT ON names REFERENCING NEW ROW AS new_row FOR EACH ROW WHEN new_row.name = '<some name>' INSERT INTO names2 VALUES (new_row.name);
The problem is it doesn't care about WHEN clause. Any INSERT query will appear in names2. Can anyone help?
Majid this is indeed a missing feature of the current trigger implementation. See also bug report http://bugs.monetdb.org/show_bug.cgi?id=2073 Niels
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
participants (2)
-
Majid Azimi
-
Niels Nes