create table tbl(id serial PRIMARY KEY,tx text);
create table tbl_log(lid serial PRIMARY KEY,nid int4,ntx text);
create rule tblins AS ON insert to tbl do insert into tbl_log (nid,ntx) VALUES (new.*);
insert into tbl (tx) Values ('This');
insert into tbl (tx) Values ('is a');
insert into tbl (tx) values ('test');
select * from tbl;
select * from tbl_log;
insert into tbl (tx) select tx from tbl;
select * from tbl;
select * from tbl_log;