def __init__(self, host=None, port=None,<EOL>database=None, user=None, password=None, autoInit=True):
self._conn = None<EOL>self._connParams = {}<EOL>self._version = None<EOL>self._conn = None<EOL>if host is not None:<EOL><INDENT>self._connParams['<STR_LIT:host>'] = host<EOL>if port is not None:<EOL><INDENT>self._connParams['<STR_LIT:port>'] = int(port)<EOL><DEDENT>else:<EOL><INDENT>self._connParams['<STR_LIT:port>'] = defaultPGport<EOL><DEDENT><DEDENT>elif port is not None:<EOL><INDENT>self._connParams['<STR_LIT:host>'] = '<STR_LIT:127.0.0.1>'<EOL>self._connParams['<STR_LIT:port>'] = int(port)<EOL><DEDENT>if database is not None:<EOL><INDENT>self._connParams['<STR_LIT>'] = database<EOL><DEDENT>if user is not None:<EOL><INDENT>self._connParams['<STR_LIT:user>'] = user<EOL>if password is not None:<EOL><INDENT>self._connParams['<STR_LIT:password>'] = password<EOL><DEDENT><DEDENT>if autoInit:<EOL><INDENT>self._connect()<EOL><DEDENT>
Initialize connection to PostgreSQL Database.

        @param host:     PostgreSQL Host
                         (Defaults to UNIX socket if not provided.)
        @param port:     PostgreSQL Port
                         (Defaults to 5432 for network connections.)
        @param database: PostgreSQL Database
                         (The default is the login the for connecting user.)
        @param user:     PostgreSQL User
                         (The default is the login of OS user for UNIX sockets.
                         Must be specified for network connections.)
        @param password: PostgreSQL Password
                         (Attempt login without password by default.)
        @param autoInit: If True connect to PostgreSQL Database on instantiation.