updating table rows in postgres using subquery updating table rows in postgres using subquery postgresql postgresql