Rewrite module pgsql to use new v8 api