def ps_new_query(tags=[], options = "all"):
    """
    Query from PostgreSQL
    Args:
        tags: list of tags
        options: 'all' means the posting must contains all the tags while 'any' means
        that the posting needs to contain at least one of the tags
    Returns:
        job postings containing the tags, either containing all of the tags or
        at least one of the tags
    """
    if options == 'all':
        sql_query = "SELECT * FROM jobs WHERE tags @> array{} LIMIT 25".format(tags)
    else:
        sql_query = "SELECT * FROM jobs WHERE tags && array{} LIMIT 25".format(tags)
    return sql_query