Thus spake Richard Huxton
> begin;
>   insert into archive_foo (select * from foo where foo_id=1);
>   delete from foo where foo_id=1;
> commit;
> 
> Is probably the closest you could get.
> 
> Alternatively, you could wrap the above up in a function and just go:
> 
> select do_archive_foo(1);

Or even use a trigger if suitable.  You can have the delete automatically
trigger an insert into another table.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to