Modified to implement postgres adapter and...

...postgres sql changes

567 examples, 0 failures
Coverage report generated for RSpec to /Users/yzhang/the_policy_machine/coverage. 624 / 702 LOC (88.89%) covered.
Passes specs in dalton postgres branch with this commit on postgres, mysql and memory backends
I'd recommend the sql pattern `select NULL` here, instead of `select *`.  Especially for performance, since there are indexes on the where columns, so no need for it to go back to the clustered index in the query. I know select null works for tsql and mysql, but if not for pg then you could use `select id` with the same effect.