fix db syntax for pg
add ipthn