Transactions in rules.. - Mailing list pgsql-general

From Fabrizio Mazzoni
Subject Transactions in rules..
Date
Msg-id 000201c10880$04abf960$4f00a8c0@fabrizio
Whole thread Raw
Responses Re: Transactions in rules..  (Jan Wieck <JanWieck@Yahoo.com>)
Re: Transactions in rules..  (Alex Pilosov <alex@pilosoft.com>)
Re: Transactions in rules..  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Can i use transactions in rules??
I was trying something like:

create rule x_test as
on insert to view1
do instead
(
    begin;
    insert into test1 values (new.a,new.b);
    insert into test2 values (new.c,new.d);
    commit;
);

But when i give this command in psql i always get an error..

Regards

fabrizio@macrongolf.com
http://macrongolf.com
http://eteampoint.com
http://macron.com


pgsql-general by date:

Previous
From: "Yasuo Ohgaki"
Date:
Subject: Re: Re: [DOCS] QUERY - Including the new LDP PostgreSQL HOWTO in the main PostgreSQL distribution
Next
From: Jan Wieck
Date:
Subject: Re: trigger: NEW/OLD-error or nothing happens