move postgresql commands into their own file