3.18 install error on step02

I wanted to have a look at 3.18 but I get the following when I run step02.php

    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character varying = integer
    LINE 7:	  r.userid = 0)
    					  ^
    HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.' in /Library/WebServer/Matrix/core/lib/DAL/DAL.inc:680
    Stack trace:
    #0 /Library/WebServer/Matrix/core/lib/DAL/DAL.inc(680): PDO->exec('CREATE OR REPLA...')
    #1 /Library/WebServer/Matrix/core/lib/db_install/db_install.inc(797): DAL::executeSql('CREATE OR REPLA...')
    #2 /Library/Webserver/Matrix/install/step_02.php(118): install_stored_relations('views')
    #3 {main}
      thrown in /Library/WebServer/Matrix/core/lib/DAL/DAL.inc on line 680
    sh-3.2# /usr/local/php5/bin/php install/step_02.php /Library/WebServer/Matrix
    
    Fatal error: Uncaught exception 'DALException' with message 'SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "sq_ast_typ" does not exist' in /Library/WebServer/Matrix/core/lib/DAL/DAL.inc:527
    Stack trace:
    #0 /Library/WebServer/Matrix/core/lib/DAL/DAL.inc(704): DAL::executePdoAssoc(Object(PDOStatement), NULL)
    #1 /Library/WebServer/Matrix/core/include/asset_manager.inc(149): DAL::executeSqlAssoc('SELECT type_cod...')
    #2 /Library/WebServer/Matrix/core/include/asset_manager.inc(118): Asset_Manager->getAssetTypes()
    #3 /Library/WebServer/Matrix/core/include/asset_manager.inc(84): Asset_Manager->_loadAssetTypes()
    #4 /Library/WebServer/Matrix/core/include/mysource.inc(214): Asset_Manager->Asset_Manager()
    #5 /Library/WebServer/Matrix/core/include/init.inc(233): MySource->init()
    #6 /Library/Webserver/Matrix/install/step_02.php(57): require_once('/Library/WebSer...')
    #7 {main}
      thrown in /Library/WebServer/Matrix/core/lib/DAL/DAL.inc on line 527


phpinfo shows for PDO
    PDO Driver for PostgreSQL	enabled
    PostgreSQL(libpq) Version	8.3.0
    Module version	1.0.2
    Revision	 $Id: pdo_pgsql.c,v 1.7.2.11.2.1 2007/01/01 09:36:05 sebastian Exp $