Fixed a bug of updating coefficients for PostgreSQL