Revert "change to postgresql"

This reverts commit b5605cfe19e77133a071afe3b4869e0a09e6fde5.
ordered code