cast to char for postgres and mysql compatibility