Added changes for mysql to psql.