I've added a new column to my postgresql table. Now I want to add values to this new added column. The only commands I found allow adding values but not in chosen rows of the column. What I'm tryin to have is:
cursor.execute('SELECT Column_name FROM Table_name')
rows = cursor.fetchall()
cursor.execute('ALTER TABLE Table_name ADD NewColumn_name type')
for row in rows:
#Here I want to have a commands that adds a value (result of a function: func(row)) to every row of the new column, one by one something like:
NewColumn_name[i] = func(row)
i = i+1