Fix bug#2629. Use Postgresql syntax to cast to an interval. It doens't matter if we use the oracle style convenience funciton since this is still a postgresql specific query.
This fixes date arithmetic, "insert into ... select" column order mismatch, and concatenation syntax error in acs-mail-lite. Bug 1719, patch 489. Gabriel Burca.