---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_user.sql
---
SOURCE_FILE
  COMMENT "-- simple"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    ROLE_OPTION_LIST
      ROLE_OPTION
        IDENT "superuser"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- full"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    ROLE_OPTION_LIST
      WITH_KW "with"
      WHITESPACE " \n "
      ROLE_OPTION
        IDENT "superuser"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "nosuperuser"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "createdb"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "nocreatedb"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "createrole"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "nocreaterole"
      WHITESPACE "\n "
      ROLE_OPTION
        INHERIT_KW "inherit"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "noinherit"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "login"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "nologin"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "replication"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "noreplication"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "bypassrls"
      WHITESPACE "\n "
      ROLE_OPTION
        IDENT "nobypassrls"
      WHITESPACE "\n "
      ROLE_OPTION
        CONNECTION_KW "connection"
        WHITESPACE " "
        LIMIT_KW "limit"
        WHITESPACE " "
        LITERAL
          INT_NUMBER "10"
      WHITESPACE "\n "
      ROLE_OPTION
        ENCRYPTED_KW "encrypted"
        WHITESPACE " "
        PASSWORD_KW "password"
        WHITESPACE " "
        LITERAL
          STRING "''"
      WHITESPACE "\n "
      ROLE_OPTION
        PASSWORD_KW "password"
        WHITESPACE " "
        NULL_KW "null"
      WHITESPACE "\n "
      ROLE_OPTION
        PASSWORD_KW "password"
        WHITESPACE " "
        LITERAL
          STRING "'foo'"
      WHITESPACE "\n "
      ROLE_OPTION
        VALID_KW "valid"
        WHITESPACE " "
        UNTIL_KW "until"
        WHITESPACE " "
        LITERAL
          STRING "'2025-01-01'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- rename_user"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "v"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      WHITESPACE " "
      EQ "="
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      DEFAULT_KW "default"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    IN_KW "in"
    WHITESPACE " "
    DATABASE_KW "database"
    WHITESPACE " "
    NAME_REF
      IDENT "d"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      WHITESPACE " "
      FROM_KW "from"
      WHITESPACE " "
      CURRENT_KW "current"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- reset"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    NAME_REF
      IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    ALL_KW "all"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_USER
    ALTER_KW "alter"
    WHITESPACE " "
    USER_KW "user"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "u"
    WHITESPACE " "
    IN_KW "in"
    WHITESPACE " "
    DATABASE_KW "database"
    WHITESPACE " "
    NAME_REF
      IDENT "d"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    NAME_REF
      IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n\n"
