More bugs fixed in record_dao for PGSQL.
Added missing locale controller.