def language_create(name,
                    maintenance_db,
                    user=None,
                    host=None,
                    port=None,
                    password=None,
                    runas=None):
    '''
    .. versionadded:: 2016.3.0

    Installs a language into a database

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_create plpgsql dbname

    name
       Language to install

    maintenance_db
        The database to install the language in

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
    '''

    if language_exists(name, maintenance_db):
        log.info('Language %s already exists in %s', name, maintenance_db)
        return False

    query = 'CREATE LANGUAGE {0}'.format(name)

    ret = _psql_prepare_and_run(['-c', query],
                                user=user,
                                host=host,
                                port=port,
                                maintenance_db=maintenance_db,
                                password=password,
                                runas=runas)

    return ret['retcode'] == 0
def language_create ( name , maintenance_db , user = None , host = None , port = None , password = None , runas = None ) : if language_exists ( name , maintenance_db ) : log . info ( 'Language %s already exists in %s' , name , maintenance_db ) return False query = 'CREATE LANGUAGE {0}' . format ( name ) ret = _psql_prepare_and_run ( [ '-c' , query ] , user = user , host = host , port = port , maintenance_db = maintenance_db , password = password , runas = runas ) return ret [ 'retcode' ] == 0
.. versionadded:: 2016.3.0

    Installs a language into a database

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_create plpgsql dbname

    name
       Language to install

    maintenance_db
        The database to install the language in

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of