Search Postgresql Archives

Copy entire row on elete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

I use triggers with plpgsql, now I have a situation I have to copy the entire tuple of a table before it gets deleted to another table. I wonder if is there a way to say:

insert into c select * from OLD;

But I got this error:

ERROR: OLD used in query that is not in a rule

"No cambies la salud por la riqueza, ni la libertad por el poder."Any idea how to get it done properly?, thanks in advance.


-- Sinceramente, Josué Maldonado.


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux