bug in delete rule ?

Поиск
Список
Период
Сортировка
От sferriol
Тема bug in delete rule ?
Дата
Msg-id 4062FAEC.60005@imag.fr
обсуждение исходный текст
Ответы Re: bug in delete rule ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: bug in delete rule ?  (günter strubinsky <strubinsky@acm.org>)
Список pgsql-general
hello
i have a view which joins two tables
CREATE VIEW ALL_CENTERS AS
    SELECT
    t0.center_id,
    t0.institution,
    t0.category,
    t0.street_number,
    t0.street_name,
    t0.postcode,
    t0.district_name,
    t0.city_name,
    t0.province_name,
    t0.country,
    t1.update_date,
    t1.number_of_beds,
    t1.chief,
    t1.phone_center,
    t1.fax_center
    FROM
    center t0,
    center_var t1
    WHERE
    t0.center_id = t1.center_id;

and i create a rule for deleting using the view:
CREATE RULE ALL_CENTERS_DEL AS ON DELETE TO all_centers
DO INSTEAD (
    DELETE FROM center_var WHERE
    center_id = OLD.center_id;
    DELETE FROM center WHERE
    center_id = OLD.center_id;
);

but i this rule delete only line in center_var
and do not remove the line in center table

why ?

sylvain


Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: Re: Adding flexibilty to queries
Следующее
От: Steve Crawford
Дата:
Сообщение: Mailing List Problems