integrating psql, orders support
adding the new stuff for orders