A couple of Postgres changes.

Made a couple of small changes to the active record model and sql generation to support EPWP2.