PostgreSQL : send all rows of a table to a function I have a table with one column (double precision numbers). I also have made a function (with double precision numbers as input and output), and I want to send every value of my table to the function, and store the output in a second (new) column.

What is the best way to do this? Make a void function with a loop in it? Or are there better ways?

Thannks
UPDATE mytbl
SET col2=myfn(col1)


should do the trick