---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_procedure.sql
---
SOURCE_FILE
  COMMENT "-- rename"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "q"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH
          PATH_SEGMENT
            NAME_REF
              IDENT "foo"
        DOT "."
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
      PARAM_LIST
        L_PAREN "("
        PARAM
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  INT_KW "int"
        COMMA ","
        WHITESPACE " "
        PARAM
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  TEXT_KW "text"
        R_PAREN ")"
    WHITESPACE "\n  "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "q"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- owner"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        NAME_REF
          IDENT "u"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        CURRENT_USER_KW "current_user"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_schema"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    SET_SCHEMA
      SET_KW "set"
      WHITESPACE " "
      SCHEMA_KW "schema"
      WHITESPACE " "
      NAME_REF
        IDENT "s"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- security"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SECURITY_FUNC_OPTION
        SECURITY_KW "security"
        WHITESPACE " "
        INVOKER_KW "invoker"
      WHITESPACE "\n  "
      SECURITY_FUNC_OPTION
        EXTERNAL_KW "external"
        WHITESPACE " "
        SECURITY_KW "security"
        WHITESPACE " "
        INVOKER_KW "invoker"
      WHITESPACE "\n  "
      SECURITY_FUNC_OPTION
        SECURITY_KW "security"
        WHITESPACE " "
        DEFINER_KW "definer"
      WHITESPACE "\n  "
      SECURITY_FUNC_OPTION
        EXTERNAL_KW "external"
        WHITESPACE " "
        SECURITY_KW "security"
        WHITESPACE " "
        DEFINER_KW "definer"
    WHITESPACE " \n  "
    RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- actions"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SECURITY_FUNC_OPTION
        SECURITY_KW "security"
        WHITESPACE " "
        INVOKER_KW "invoker"
      WHITESPACE "\n  "
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "c"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
      WHITESPACE "\n  "
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "d"
          WHITESPACE " "
          FROM_KW "from"
          WHITESPACE " "
          CURRENT_KW "current"
      WHITESPACE "\n  "
      RESET_FUNC_OPTION
        RESET_KW "reset"
        WHITESPACE " "
        PATH
          PATH_SEGMENT
            NAME_REF
              IDENT "z"
      WHITESPACE "\n  "
      RESET_FUNC_OPTION
        RESET_KW "reset"
        WHITESPACE " "
        ALL_KW "all"
    WHITESPACE "\n  "
    RESTRICT_KW "restrict"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_param"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "c"
          WHITESPACE " "
          TO_KW "to"
          WHITESPACE " "
          NAME_REF
            IDENT "v"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "c"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          NAME_REF
            IDENT "v"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "c"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          DEFAULT_KW "default"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      SET_FUNC_OPTION
        SET_CONFIG_PARAM
          SET_KW "set"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "c"
          WHITESPACE " "
          FROM_KW "from"
          WHITESPACE " "
          CURRENT_KW "current"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- reset_param"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      RESET_FUNC_OPTION
        RESET_KW "reset"
        WHITESPACE " "
        PATH
          PATH_SEGMENT
            NAME_REF
              IDENT "c"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    FUNC_OPTION_LIST
      RESET_FUNC_OPTION
        RESET_KW "reset"
        WHITESPACE " "
        ALL_KW "all"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- depends"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    DEPENDS_KW "depends"
    WHITESPACE " "
    ON_KW "on"
    WHITESPACE " "
    EXTENSION_KW "extension"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "e"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_PROCEDURE
    ALTER_KW "alter"
    WHITESPACE " "
    PROCEDURE_KW "procedure"
    WHITESPACE " "
    FUNCTION_SIG
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "p"
    WHITESPACE "\n  "
    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\n"
