begin postgresql interface