From: | "Vladimir V(dot) Zolotych" <gsmith(at)eurocom(dot)od(dot)ua> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | RULE bug? |
Date: | 2000-05-02 14:19:02 |
Message-ID: | 390EE3D6.1784C75B@eurocom.od.ua |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)eurocom(dot)od(dot)ua
From | Date | Subject | |
---|---|---|---|
Next Message | Jack Zhu | 2000-05-02 22:01:28 | Output from 'timestamp' column!? |
Previous Message | Daniel Kern | 2000-05-02 11:09:25 |