Postgres update

Includes changes from N52 wps 3.3.0 upgrade  branch
I don't think we should be doing this.  This smells like we are doing something wrong.