RULE bug?

Поиск
Список
Период
Сортировка
От Vladimir V. Zolotych
Тема RULE bug?
Дата
Msg-id 390EE3D6.1784C75B@eurocom.od.ua
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Daniel Kern
Дата:
Сообщение:
Следующее
От: "Jack Zhu"
Дата:
Сообщение: Output from 'timestamp' column!?