BUG #1952: Doc 32.4 example

From: "incheol yang" <zoar(at)paran(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1952: Doc 32.4 example
Date: 2005-10-11 00:47:38
Message-ID: 20051011004738.492C5F0BE2@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


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=#

Browse pgsql-bugs by date

  From Date Subject
Next Message John Shin 2005-10-11 01:25:59 .pgpass does not work for createlang
Previous Message Jim C. Nasby 2005-10-10 23:33:55 Re: BUG #1947: Enhancement Request - CONCAT() function