Search Postgresql Archives

Re: Copy entire row on elete

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

 



> 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:

If you have a unique key you could do the following:

INSERT into C select * from old_table where key = OLD.key.
--
Mike Nolan

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly

[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