dbTalk Databases Forums  

[BUGS] BUG #1952: Doc 32.4 example

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1952: Doc 32.4 example in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
incheol yang
 
Posts: n/a

Default [BUGS] BUG #1952: Doc 32.4 example - 10-11-2005 , 10:59 AM







The following bug has been logged online:

Bug reference: 1952
Logged by: incheol yang
Email address: zoar (AT) paran (DOT) com
PostgreSQL version: 8.0.3, 8.0.4
Operating system: linux
Description: Doc 32.4 example
Details:

You said like this

=> DELETE FROM ttest;
INFO: trigf (fired before): there are 2 rows in ttest
INFO: trigf (fired after ): there are 1 rows in ttest
INFO: trigf (fired before): there are 1 rows in ttest
INFO: trigf (fired after ): there are 0 rows in ttest
^^^^^^
remember what we said about visibility.
DELETE 2

but I got different output.

vela=# delete from ttest;
ì*•ë³´: trigf (fired before): there are 2 rows in ttest
ì*•ë³´: trigf (fired before): there are 1 rows in ttest
ì*•ë³´: trigf (fired after ): there are 0 rows in ttest
ì*•ë³´: trigf (fired after ): there are 0 rows in ttest
DELETE 2

Is this my mistake?

################################################## ###
This is my entire list

vela=# \i MakeTrigger.sql
DROP TABLE
DROP FUNCTION
CREATE TABLE
CREATE FUNCTION
CREATE TRIGGER
CREATE TRIGGER
vela=# insert into ttest values (null);
ì*•ë³´: trigf (fired before): there are 0 rows in ttest
INSERT 0 0
vela=# insert into ttest values (1);
ì*•ë³´: trigf (fired before): there are 0 rows in ttest
ì*•ë³´: trigf (fired after ): there are 1 rows in ttest
INSERT 117771 1
vela=# insert into ttest select x *2 from ttest;
ì*•ë³´: trigf (fired before): there are 1 rows in ttest
ì*•ë³´: trigf (fired after ): there are 2 rows in ttest
INSERT 117772 1
vela=# update ttest set x = null where x = 2;
ì*•ë³´: trigf (fired before): there are 2 rows in ttest
UPDATE 0
vela=# update ttest set x = 4 where x = 2;
ì*•ë³´: trigf (fired before): there are 2 rows in ttest
ì*•ë³´: trigf (fired after ): there are 2 rows in ttest
UPDATE 1
vela=# delete from ttest;
ì*•ë³´: trigf (fired before): there are 2 rows in ttest
ì*•ë³´: trigf (fired before): there are 1 rows in ttest
ì*•ë³´: trigf (fired after ): there are 0 rows in ttest
ì*•ë³´: trigf (fired after ): there are 0 rows in ttest
DELETE 2
vela=#

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.