update db as pg