PostgreSQL: Clone rows but replace one column
Image I have the following table: (in reality there are more columns) user_id | product_id ---------|------------ 1| 1 1| 2 1| 3 2| 2 2| 3 Basically, I need to copy all rows with user_id = 1 but change it…