Updating Postgres assignField query