Please read README.authmysql.html since almost all information there applies to postgres as well, but with postgres change the schema to:
CREATE TABLE passwd ( id varchar(128) DEFAULT '' NOT NULL, crypt varchar(128) DEFAULT '' NOT NULL, clear varchar(128) DEFAULT '' NOT NULL, name varchar(128) DEFAULT '' NOT NULL, uid int(10) unsigned DEFAULT '65534' NOT NULL, gid int(10) unsigned DEFAULT '65534' NOT NULL, home varchar(255) DEFAULT '' NOT NULL, maildir varchar(255) DEFAULT '' NOT NULL, defaultdelivery varchar(255) DEFAULT '' NOT NULL, quota varchar(255) DEFAULT '' NOT NULL, CONSTRAINT id PRIMARY KEY (id) );