---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_subscription.sql
---
SOURCE_FILE
  COMMENT "-- connection"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    CONNECTION_KW "connection"
    WHITESPACE " "
    LITERAL
      STRING "'host=localhost port=5432'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_publication"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    SET_KW "set"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME
      IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    SET_KW "set"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME
      IDENT "p"
    COMMA ","
    WHITESPACE " "
    NAME
      IDENT "q"
    COMMA ","
    WHITESPACE " "
    NAME
      IDENT "r"
    WHITESPACE " "
    WITH_KW "with"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      ATTRIBUTE_OPTION
        NAME
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      ATTRIBUTE_OPTION
        NAME
          IDENT "b"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          LITERAL
            TRUE_KW "true"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- add_publication"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    ADD_KW "add"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME
      IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    ADD_KW "add"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME
      IDENT "a"
    COMMA ","
    WHITESPACE " "
    NAME
      IDENT "b"
    COMMA ","
    WHITESPACE " "
    NAME
      IDENT "c"
    WHITESPACE " "
    WITH_KW "with"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      ATTRIBUTE_OPTION
        NAME
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      ATTRIBUTE_OPTION
        NAME
          IDENT "b"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          LITERAL
            INT_NUMBER "1"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_publication"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    DROP_KW "drop"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME_REF
      IDENT "p"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    DROP_KW "drop"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    NAME_REF
      IDENT "a"
    COMMA ","
    WHITESPACE " "
    NAME_REF
      IDENT "b"
    COMMA ","
    WHITESPACE " "
    NAME_REF
      IDENT "c"
    WHITESPACE " "
    WITH_KW "with"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      ATTRIBUTE_OPTION
        NAME
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      ATTRIBUTE_OPTION
        NAME
          IDENT "b"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          LITERAL
            INT_NUMBER "1"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- refresh"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    REFRESH_KW "refresh"
    WHITESPACE " "
    PUBLICATION_KW "publication"
    WHITESPACE " "
    WITH_KW "with"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      ATTRIBUTE_OPTION
        NAME
          IDENT "copy_data"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          LITERAL
            FALSE_KW "false"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- enable"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    ENABLE_KW "enable"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- disable"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    DISABLE_KW "disable"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_parameters"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    SET_OPTIONS
      SET_KW "set"
      WHITESPACE " "
      ATTRIBUTE_LIST
        L_PAREN "("
        ATTRIBUTE_OPTION
          NAME
            IDENT "slot_name"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          ATTRIBUTE_VALUE
            LITERAL
              STRING "'new_slot'"
        COMMA ","
        WHITESPACE " "
        ATTRIBUTE_OPTION
          NAME
            IDENT "synchronous_commit"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          ATTRIBUTE_VALUE
            LITERAL
              STRING "'off'"
        R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- skip"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    SKIP_KW "skip"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      ATTRIBUTE_OPTION
        NAME
          LSN_KW "lsn"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          LITERAL
            STRING "'0/12345678'"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- owner"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        NAME_REF
          IDENT "u"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        CURRENT_USER_KW "current_user"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- rename"
  WHITESPACE "\n"
  ALTER_SUBSCRIPTION
    ALTER_KW "alter"
    WHITESPACE " "
    SUBSCRIPTION_KW "subscription"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE " "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "t"
  SEMICOLON ";"
  WHITESPACE "\n\n"
