Update for pgsql