postgresql7.1
insert into acs_mail_lite_queue
(message_id, to_addr, from_addr, subject, body, extra_headers, bcc)
values
(nextval('acs_mail_lite_id_seq'), :to_addr, :from_addr, :subject, :body, :eh_list, :bcc)
select message_id,
to_addr,
from_addr,
subject,
body,
extra_headers,
bcc
from acs_mail_lite_queue
delete
from acs_mail_lite_queue
where message_id = :message_id