This patch fixes some bugs in the PostgreSQL database
schema, and tries to ease the port from MySQL.
Aligned PostgreSQL tables to MySQL tables as much as
Split back users table into users_*.
Fixed some char(x) when varchar(x) makes much more
Added mysql emulation functions: ifnull, from_unixtime,
unix_timestamp, to_days, from_days
This patch supercedes an earlier, not commited patch.