---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_default_privileges.sql
---
SOURCE_FILE
  COMMENT "-- simple"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- full"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    FOR_KW "for"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF_LIST
      ROLE_REF
        NAME_REF
          IDENT "r"
      COMMA ","
      WHITESPACE " "
      ROLE_REF
        CURRENT_USER_KW "current_user"
    WHITESPACE "\n  "
    IN_KW "in"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    COMMA ","
    WHITESPACE " "
    NAME_REF
      IDENT "s2"
    COMMA ","
    WHITESPACE " "
    NAME_REF
      IDENT "s3"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    FOR_KW "for"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF_LIST
      ROLE_REF
        SESSION_USER_KW "session_user"
    WHITESPACE "\n  "
    IN_KW "in"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- grant_tables"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                INSERT_KW "insert"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                UPDATE_KW "update"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "public"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          CURRENT_USER_KW "current_user"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            SESSION_USER_KW "session_user"
      WHITESPACE "\n    "
      WITH_KW "with"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                DELETE_KW "delete"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRUNCATE_KW "truncate"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            REFERENCES_KW "references"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRIGGER_KW "trigger"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "maintain"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                INSERT_KW "insert"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                UPDATE_KW "update"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                DELETE_KW "delete"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRUNCATE_KW "truncate"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            REFERENCES_KW "references"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRIGGER_KW "trigger"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "maintain"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n    "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n    "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- grant_sequences"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            SELECT_KW "select"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                UPDATE_KW "update"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SEQUENCES_KW "sequences"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "u"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            SESSION_USER_KW "session_user"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_ROLE_KW "current_role"
      WHITESPACE "\n  "
      WITH_KW "with"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SEQUENCES_KW "sequences"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- grant_functions"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                EXECUTE_KW "execute"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        FUNCTIONS_KW "functions"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "u"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        ROUTINES_KW "routines"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        ROUTINES_KW "routines"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      WITH_KW "with"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- grant_types"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TYPES_KW "types"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TYPES_KW "types"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            IDENT "u"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          NAME_REF
            IDENT "public"
      WHITESPACE "\n  "
      WITH_KW "with"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- grant_schemas"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            CREATE_KW "create"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SCHEMAS_KW "schemas"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    GRANT_DEFAULT_PRIVILEGES
      GRANT_KW "grant"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SCHEMAS_KW "schemas"
      WHITESPACE "\n  "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            IDENT "u"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          NAME_REF
            IDENT "public"
      WHITESPACE "\n  "
      WITH_KW "with"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- revoke_tables"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
      WHITESPACE " "
      FOR_KW "for"
      WHITESPACE "\n  "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                INSERT_KW "insert"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                UPDATE_KW "update"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                DELETE_KW "delete"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRUNCATE_KW "truncate"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            REFERENCES_KW "references"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                TRIGGER_KW "trigger"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "maintain"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
      WHITESPACE "\n  "
      CASCADE_KW "cascade"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TABLES_KW "tables"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- revoke_sequences"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
      WHITESPACE " "
      FOR_KW "for"
      WHITESPACE "\n  "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            SELECT_KW "select"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                UPDATE_KW "update"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SEQUENCES_KW "sequences"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
      WHITESPACE "\n  "
      CASCADE_KW "cascade"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            SELECT_KW "select"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SEQUENCES_KW "sequences"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- revoke_functions"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
      WHITESPACE " "
      FOR_KW "for"
      WHITESPACE "\n  "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                EXECUTE_KW "execute"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        FUNCTIONS_KW "functions"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
      WHITESPACE "\n  "
      CASCADE_KW "cascade"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        ROUTINES_KW "routines"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- revoke_types"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
      WHITESPACE " "
      FOR_KW "for"
      WHITESPACE "\n  "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TYPES_KW "types"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
      WHITESPACE "\n  "
      CASCADE_KW "cascade"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        TYPES_KW "types"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- revoke_schemas"
  WHITESPACE "\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      GRANT_KW "grant"
      WHITESPACE " "
      OPTION_KW "option"
      WHITESPACE " "
      FOR_KW "for"
      WHITESPACE "\n  "
      PRIVILEGES
        REVOKE_COMMAND_LIST
          REVOKE_COMMAND
            ROLE_REF
              NAME_REF
                IDENT "usage"
          COMMA ","
          WHITESPACE " "
          REVOKE_COMMAND
            CREATE_KW "create"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SCHEMAS_KW "schemas"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
        COMMA ","
        WHITESPACE " "
        ROLE_REF
          GROUP_KW "group"
          WHITESPACE " "
          NAME_REF
            CURRENT_USER_KW "current_user"
      WHITESPACE "\n  "
      CASCADE_KW "cascade"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_DEFAULT_PRIVILEGES
    ALTER_KW "alter"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    PRIVILEGES_KW "privileges"
    WHITESPACE "\n  "
    REVOKE_DEFAULT_PRIVILEGES
      REVOKE_KW "revoke"
      WHITESPACE " "
      PRIVILEGES
        ALL_KW "all"
        WHITESPACE " "
        PRIVILEGES_KW "privileges"
      WHITESPACE "\n  "
      ON_KW "on"
      WHITESPACE " "
      PRIVILEGE_TARGET
        SCHEMAS_KW "schemas"
      WHITESPACE "\n  "
      FROM_KW "from"
      WHITESPACE " "
      ROLE_REF_LIST
        ROLE_REF
          NAME_REF
            IDENT "r"
      WHITESPACE "\n  "
      RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
