update psql functionality