RULE bug? - Mailing list pgsql-admin

From Vladimir V. Zolotych
Subject RULE bug?
Date
Msg-id 390EE3D6.1784C75B@eurocom.od.ua
Whole thread Raw
List pgsql-admin
  Hello all,

Due to bug (?) I can't trace insertions into
table with SERIAL. E.g., if a table contains column
of a type SERIAL with name 'id', when RULE activated
NEW.id equals X, but real 'id' of a inserted record is X+1.

(Here the RULE definition:

CREATE RULE log_orders AS ON INSERT TO orders
    DO INSERT INTO orders_log VALUES (

    NEW.id,
    'I',
--............................
    'now'::text,
    getpgusername());
)

Having that log table with invalid (differed by 1) 'id' I've
tried:

select o.* from orders o, orders_log L where (o.id = (L.order_id + 1));

This is didn't work too!
Can anybody help?
  Thanks!
 

-- 
Vladimir Zolotych                         gsmith@eurocom.od.ua
 

pgsql-admin by date:

Previous
From: Daniel Kern
Date:
Subject:
Next
From: "Jack Zhu"
Date:
Subject: Output from 'timestamp' column!?