modified update query to be performed per file

Just modified  a tpostgresqlRow query cause update was run on the whole table  instead on specific file.
Please review.