---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_index.sql
---
SOURCE_FILE
  COMMENT "-- rename"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "j"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    IF_EXISTS
      IF_KW "if"
      WHITESPACE " "
      EXISTS_KW "exists"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "j"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_tablespace"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    SET_TABLESPACE
      SET_KW "set"
      WHITESPACE " "
      TABLESPACE_KW "tablespace"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "t"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    IF_EXISTS
      IF_KW "if"
      WHITESPACE " "
      EXISTS_KW "exists"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    SET_TABLESPACE
      SET_KW "set"
      WHITESPACE " "
      TABLESPACE_KW "tablespace"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "t"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_params"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    SET_OPTIONS
      SET_KW "set"
      WHITESPACE " "
      ATTRIBUTE_LIST
        L_PAREN "("
        ATTRIBUTE_OPTION
          NAME
            IDENT "a"
        R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    IF_EXISTS
      IF_KW "if"
      WHITESPACE " "
      EXISTS_KW "exists"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    SET_OPTIONS
      SET_KW "set"
      WHITESPACE " "
      ATTRIBUTE_LIST
        L_PAREN "("
        ATTRIBUTE_OPTION
          NAME
            IDENT "a"
          EQ "="
          ATTRIBUTE_VALUE
            LITERAL
              INT_NUMBER "1"
        COMMA ","
        WHITESPACE " "
        ATTRIBUTE_OPTION
          NAME
            IDENT "b"
          EQ "="
          ATTRIBUTE_VALUE
            LITERAL
              STRING "'v'"
        R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- reset_params"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    RESET_OPTIONS
      RESET_KW "reset"
      WHITESPACE " "
      ATTRIBUTE_LIST
        L_PAREN "("
        ATTRIBUTE_OPTION
          NAME
            IDENT "a"
        R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    IF_EXISTS
      IF_KW "if"
      WHITESPACE " "
      EXISTS_KW "exists"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    RESET_OPTIONS
      RESET_KW "reset"
      WHITESPACE " "
      ATTRIBUTE_LIST
        L_PAREN "("
        ATTRIBUTE_OPTION
          NAME
            IDENT "a"
        COMMA ","
        WHITESPACE " "
        ATTRIBUTE_OPTION
          NAME
            IDENT "b"
        R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- attach"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    ATTACH_PARTITION
      ATTACH_KW "attach"
      WHITESPACE " "
      PARTITION_KW "partition"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    ATTACH_PARTITION
      ATTACH_KW "attach"
      WHITESPACE " "
      PARTITION_KW "partition"
      WHITESPACE " "
      PATH
        PATH
          PATH_SEGMENT
            NAME_REF
              IDENT "s"
        DOT "."
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- depends"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    NO_DEPENDS_ON_EXTENSION
      NO_KW "no"
      WHITESPACE " "
      DEPENDS_KW "depends"
      WHITESPACE " "
      ON_KW "on"
      WHITESPACE " "
      EXTENSION_KW "extension"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "e"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    DEPENDS_ON_EXTENSION
      DEPENDS_KW "depends"
      WHITESPACE " "
      ON_KW "on"
      WHITESPACE " "
      EXTENSION_KW "extension"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "e"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- alter_column"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    ALTER_SET_STATISTICS
      ALTER_KW "alter"
      WHITESPACE " "
      LITERAL
        INT_NUMBER "1"
      WHITESPACE " "
      SET_KW "set"
      WHITESPACE " "
      STATISTICS_KW "statistics"
      WHITESPACE " "
      LITERAL
        INT_NUMBER "100"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    IF_EXISTS
      IF_KW "if"
      WHITESPACE " "
      EXISTS_KW "exists"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "i"
    WHITESPACE " "
    ALTER_SET_STATISTICS
      ALTER_KW "alter"
      WHITESPACE " "
      COLUMN_KW "column"
      WHITESPACE " "
      LITERAL
        INT_NUMBER "1"
      WHITESPACE " "
      SET_KW "set"
      WHITESPACE " "
      STATISTICS_KW "statistics"
      WHITESPACE " "
      LITERAL
        INT_NUMBER "100"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- all_tablespace"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    ALL_KW "all"
    WHITESPACE " "
    IN_KW "in"
    WHITESPACE " "
    TABLESPACE_KW "tablespace"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " \n  "
    SET_KW "set"
    WHITESPACE " "
    TABLESPACE_KW "tablespace"
    WHITESPACE " "
    NAME_REF
      IDENT "n"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_INDEX
    ALTER_KW "alter"
    WHITESPACE " "
    INDEX_KW "index"
    WHITESPACE " "
    ALL_KW "all"
    WHITESPACE " "
    IN_KW "in"
    WHITESPACE " "
    TABLESPACE_KW "tablespace"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " \n  "
    OWNED_KW "owned"
    WHITESPACE " "
    BY_KW "by"
    WHITESPACE " "
    ROLE_REF_LIST
      ROLE_REF
        NAME_REF
          IDENT "r"
      COMMA ","
      WHITESPACE " "
      ROLE_REF
        NAME_REF
          IDENT "s"
    WHITESPACE "\n  "
    SET_KW "set"
    WHITESPACE " "
    TABLESPACE_KW "tablespace"
    WHITESPACE " "
    NAME_REF
      IDENT "n"
    WHITESPACE "\n  "
    NOWAIT_KW "nowait"
  SEMICOLON ";"
  WHITESPACE "\n\n"
