Thread: BUG #1952: Doc 32.4 example

BUG #1952: Doc 32.4 example

From
"incheol yang"
Date:
The following bug has been logged online:

Bug reference:      1952
Logged by:          incheol yang
Email address:      zoar@paran.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=#