---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/insert.sql
---
SOURCE_FILE
  COMMENT "-- insert"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Cheese'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "9.99"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "product_no"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          NAME_KW "name"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "price"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Cheese'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "9.99"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          NAME_KW "name"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "price"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "product_no"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'Cheese'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "9.99"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    DEFAULT_KW "default"
    WHITESPACE " "
    VALUES_KW "values"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "product_no"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          NAME_KW "name"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "price"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE "\n    "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Cheese'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "9.99"
          R_PAREN ")"
        COMMA ","
        WHITESPACE "\n    "
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "2"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Bread'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "1.99"
          R_PAREN ")"
        COMMA ","
        WHITESPACE "\n    "
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "3"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Milk'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            FLOAT_NUMBER "2.99"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "products"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "product_no"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          NAME_KW "name"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "price"
      R_PAREN ")"
    WHITESPACE "\n  "
    SELECT
      SELECT_CLAUSE
        SELECT_KW "select"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            NAME_REF
              IDENT "product_no"
          COMMA ","
          WHITESPACE " "
          TARGET
            NAME_REF
              NAME_KW "name"
          COMMA ","
          WHITESPACE " "
          TARGET
            NAME_REF
              IDENT "price"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "from"
        WHITESPACE " "
        FROM_ITEM
          NAME_REF
            IDENT "new_products"
      WHITESPACE "\n    "
      WHERE_CLAUSE
        WHERE_KW "where"
        WHITESPACE " "
        BIN_EXPR
          NAME_REF
            IDENT "release_date"
          WHITESPACE " "
          EQ "="
          WHITESPACE " "
          LITERAL
            STRING "'today'"
  SEMICOLON ";"
  WHITESPACE "\n\n\n"
  COMMENT "-- schema_from_docs"
  WHITESPACE "\n"
  INSERT
    WITH_CLAUSE
      WITH_KW "with"
      WHITESPACE " "
      RECURSIVE_KW "recursive"
      WHITESPACE " "
      WITH_TABLE
        NAME
          IDENT "t"
        WHITESPACE " "
        AS_KW "as"
        WHITESPACE " "
        L_PAREN "("
        WHITESPACE "\n  "
        SELECT
          SELECT_CLAUSE
            SELECT_KW "select"
            WHITESPACE " "
            TARGET_LIST
              TARGET
                STAR "*"
        WHITESPACE "\n"
        R_PAREN ")"
    WHITESPACE "\n"
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    ALIAS
      AS_KW "as"
      WHITESPACE " "
      NAME
        IDENT "foo"
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "b"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "c"
      R_PAREN ")"
    WHITESPACE "\n"
    OVERRIDING_KW "overriding"
    WHITESPACE " "
    SYSTEM_KW "system"
    WHITESPACE " "
    VALUE_KW "value"
    WHITESPACE " "
    SELECT
      SELECT_CLAUSE
        SELECT_KW "select"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            LITERAL
              INT_NUMBER "1"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- pg_docs_examples"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE "\n    "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'UA502'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Bananas'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "105"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'1971-07-13'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Comedy'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'82 minutes'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "code"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "title"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "date_prod"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "kind"
      R_PAREN ")"
    WHITESPACE "\n    "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'T_601'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Yojimbo'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "106"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'1961-06-16'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Drama'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE "\n    "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'UA502'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Bananas'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "105"
          COMMA ","
          WHITESPACE " "
          LITERAL
            DEFAULT_KW "DEFAULT"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Comedy'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'82 minutes'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "code"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "title"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "date_prod"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "kind"
      R_PAREN ")"
    WHITESPACE "\n    "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'T_601'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Yojimbo'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "106"
          COMMA ","
          WHITESPACE " "
          LITERAL
            DEFAULT_KW "DEFAULT"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Drama'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    DEFAULT_KW "DEFAULT"
    WHITESPACE " "
    VALUES_KW "VALUES"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "code"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "title"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "date_prod"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "kind"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE "\n    "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            STRING "'B6717'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Tampopo'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "110"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'1985-02-10'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Comedy'"
          R_PAREN ")"
        COMMA ","
        WHITESPACE "\n    "
        ROW
          L_PAREN "("
          LITERAL
            STRING "'HG120'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'The Dinner Game'"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "140"
          COMMA ","
          WHITESPACE " "
          LITERAL
            DEFAULT_KW "DEFAULT"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Comedy'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "films"
    WHITESPACE " "
    SELECT
      SELECT_CLAUSE
        SELECT_KW "SELECT"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "FROM"
        WHITESPACE " "
        FROM_ITEM
          NAME_REF
            IDENT "tmp_films"
      WHITESPACE " "
      WHERE_CLAUSE
        WHERE_KW "WHERE"
        WHITESPACE " "
        BIN_EXPR
          NAME_REF
            IDENT "date_prod"
          WHITESPACE " "
          L_ANGLE "<"
          WHITESPACE " "
          LITERAL
            STRING "'2004-05-07'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- Create an empty 3x3 gameboard for noughts-and-crosses"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "tictactoe"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "game"
      COMMA ","
      WHITESPACE " "
      COLUMN
        SLICE_EXPR
          SLICE_EXPR
            NAME_REF
              IDENT "board"
            L_BRACK "["
            LITERAL
              INT_NUMBER "1"
            COLON ":"
            LITERAL
              INT_NUMBER "3"
            R_BRACK "]"
          L_BRACK "["
          LITERAL
            INT_NUMBER "1"
          COLON ":"
          LITERAL
            INT_NUMBER "3"
          R_BRACK "]"
      R_PAREN ")"
    WHITESPACE "\n    "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'{{\" \",\" \",\" \"},{\" \",\" \",\" \"},{\" \",\" \",\" \"}}'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n"
  COMMENT "-- The subscripts in the above example aren't really needed"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "tictactoe"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "game"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "board"
      R_PAREN ")"
    WHITESPACE "\n    "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "2"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'{{X,\" \",\" \"},{\" \",O,\" \"},{\" \",X,\" \"}}'"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            DEFAULT_KW "DEFAULT"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'XYZ Widgets'"
          R_PAREN ")"
    WHITESPACE "\n   "
    RETURNING_CLAUSE
      RETURNING_KW "RETURNING"
      WHITESPACE " "
      TARGET_LIST
        TARGET
          NAME_REF
            IDENT "did"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    WITH_CLAUSE
      WITH_KW "WITH"
      WHITESPACE " "
      WITH_TABLE
        NAME
          IDENT "upd"
        WHITESPACE " "
        AS_KW "AS"
        WHITESPACE " "
        L_PAREN "("
        WHITESPACE "\n  "
        UPDATE
          UPDATE_KW "UPDATE"
          WHITESPACE " "
          RELATION_NAME
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "employees"
          WHITESPACE " "
          SET_CLAUSE
            SET_KW "SET"
            WHITESPACE " "
            SET_COLUMN_LIST
              SET_SINGLE_COLUMN
                COLUMN
                  NAME_REF
                    IDENT "sales_count"
                WHITESPACE " "
                EQ "="
                WHITESPACE " "
                SET_EXPR
                  BIN_EXPR
                    NAME_REF
                      IDENT "sales_count"
                    WHITESPACE " "
                    PLUS "+"
                    WHITESPACE " "
                    LITERAL
                      INT_NUMBER "1"
          WHITESPACE " "
          WHERE_CLAUSE
            WHERE_KW "WHERE"
            WHITESPACE " "
            BIN_EXPR
              NAME_REF
                IDENT "id"
              WHITESPACE " "
              EQ "="
              WHITESPACE "\n    "
              PAREN_EXPR
                L_PAREN "("
                SELECT
                  SELECT_CLAUSE
                    SELECT_KW "SELECT"
                    WHITESPACE " "
                    TARGET_LIST
                      TARGET
                        NAME_REF
                          IDENT "sales_person"
                  WHITESPACE " "
                  FROM_CLAUSE
                    FROM_KW "FROM"
                    WHITESPACE " "
                    FROM_ITEM
                      NAME_REF
                        IDENT "accounts"
                  WHITESPACE " "
                  WHERE_CLAUSE
                    WHERE_KW "WHERE"
                    WHITESPACE " "
                    BIN_EXPR
                      NAME_REF
                        NAME_KW "name"
                      WHITESPACE " "
                      EQ "="
                      WHITESPACE " "
                      LITERAL
                        STRING "'Acme Corporation'"
                R_PAREN ")"
          WHITESPACE "\n    "
          RETURNING_CLAUSE
            RETURNING_KW "RETURNING"
            WHITESPACE " "
            TARGET_LIST
              TARGET
                STAR "*"
        WHITESPACE "\n"
        R_PAREN ")"
    WHITESPACE "\n"
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "employees_log"
    WHITESPACE " "
    SELECT
      SELECT_CLAUSE
        SELECT_KW "SELECT"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
          COMMA ","
          WHITESPACE " "
          TARGET
            NAME_REF
              CURRENT_TIMESTAMP_KW "current_timestamp"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "FROM"
        WHITESPACE " "
        FROM_ITEM
          NAME_REF
            IDENT "upd"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE "\n    "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "5"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Gizmo Transglobal'"
          R_PAREN ")"
        COMMA ","
        WHITESPACE " "
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "6"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Associated Computing, Inc'"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "did"
          R_PAREN ")"
      WHITESPACE " "
      CONFLICT_DO_UPDATE_SET
        DO_KW "DO"
        WHITESPACE " "
        UPDATE_KW "UPDATE"
        WHITESPACE " "
        SET_CLAUSE
          SET_KW "SET"
          WHITESPACE " "
          SET_COLUMN_LIST
            SET_SINGLE_COLUMN
              COLUMN
                NAME_REF
                  IDENT "dname"
              WHITESPACE " "
              EQ "="
              WHITESPACE " "
              SET_EXPR
                FIELD_EXPR
                  NAME_REF
                    IDENT "EXCLUDED"
                  DOT "."
                  NAME_REF
                    IDENT "dname"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "7"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Redline GmbH'"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "did"
          R_PAREN ")"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "DO"
        WHITESPACE " "
        NOTHING_KW "NOTHING"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "b"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "c"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "2"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "3"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "a"
          COMMA ","
          WHITESPACE " "
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "b"
          R_PAREN ")"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- Don't update existing distributors based in a certain ZIP code"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    ALIAS
      AS_KW "AS"
      WHITESPACE " "
      NAME
        IDENT "d"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "8"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Anvil Distribution'"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "did"
          R_PAREN ")"
      WHITESPACE " "
      CONFLICT_DO_UPDATE_SET
        DO_KW "DO"
        WHITESPACE " "
        UPDATE_KW "UPDATE"
        WHITESPACE "\n    "
        SET_CLAUSE
          SET_KW "SET"
          WHITESPACE " "
          SET_COLUMN_LIST
            SET_SINGLE_COLUMN
              COLUMN
                NAME_REF
                  IDENT "dname"
              WHITESPACE " "
              EQ "="
              WHITESPACE " "
              SET_EXPR
                BIN_EXPR
                  FIELD_EXPR
                    NAME_REF
                      IDENT "EXCLUDED"
                    DOT "."
                    NAME_REF
                      IDENT "dname"
                  WHITESPACE " "
                  CUSTOM_OP
                    PIPE "|"
                    PIPE "|"
                  WHITESPACE " "
                  BIN_EXPR
                    LITERAL
                      STRING "' (formerly '"
                    WHITESPACE " "
                    CUSTOM_OP
                      PIPE "|"
                      PIPE "|"
                    WHITESPACE " "
                    BIN_EXPR
                      FIELD_EXPR
                        NAME_REF
                          IDENT "d"
                        DOT "."
                        NAME_REF
                          IDENT "dname"
                      WHITESPACE " "
                      CUSTOM_OP
                        PIPE "|"
                        PIPE "|"
                      WHITESPACE " "
                      LITERAL
                        STRING "')'"
        WHITESPACE "\n    "
        WHERE_CLAUSE
          WHERE_KW "WHERE"
          WHITESPACE " "
          BIN_EXPR
            FIELD_EXPR
              NAME_REF
                IDENT "d"
              DOT "."
              NAME_REF
                IDENT "zipcode"
            WHITESPACE " "
            NEQB "<>"
            WHITESPACE " "
            LITERAL
              STRING "'21201'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- Name a constraint directly in the statement (uses associated"
  WHITESPACE "\n"
  COMMENT "-- index to arbitrate taking the DO NOTHING action)"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "9"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Antwerp Design'"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_CONSTRAINT
        ON_KW "ON"
        WHITESPACE " "
        CONSTRAINT_KW "CONSTRAINT"
        WHITESPACE " "
        NAME_REF
          IDENT "distributors_pkey"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "DO"
        WHITESPACE " "
        NOTHING_KW "NOTHING"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- This statement could infer a partial unique index on \"did\""
  WHITESPACE "\n"
  COMMENT "-- with a predicate of \"WHERE is_active\", but it could also"
  WHITESPACE "\n"
  COMMENT "-- just use a regular unique constraint on \"did\""
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "distributors"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "did"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "dname"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "10"
          COMMA ","
          WHITESPACE " "
          LITERAL
            STRING "'Conrad International'"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "did"
          R_PAREN ")"
        WHITESPACE " "
        WHERE_CLAUSE
          WHERE_KW "WHERE"
          WHITESPACE " "
          NAME_REF
            IDENT "is_active"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "DO"
        WHITESPACE " "
        NOTHING_KW "NOTHING"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- with schema"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "s"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "c"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n\n"
  COMMENT "-- regression check for issue #718"
  WHITESPACE "\n"
  COMMENT "-- we were parsing the `on conflict` as the start of a `join on`"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE "\n"
    SELECT
      SELECT_CLAUSE
        SELECT_KW "SELECT"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
      WHITESPACE "\n"
      FROM_CLAUSE
        FROM_KW "FROM"
        WHITESPACE " "
        JOIN_EXPR
          FROM_ITEM
            NAME_REF
              IDENT "t"
          WHITESPACE "\n"
          JOIN
            JOIN_CROSS
              CROSS_KW "CROSS"
              WHITESPACE " "
              JOIN_KW "JOIN"
            WHITESPACE " "
            FROM_ITEM
              NAME_REF
                IDENT "f"
    WHITESPACE "\n"
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE "\n  "
      CONFLICT_DO_NOTHING
        DO_KW "DO"
        WHITESPACE " "
        NOTHING_KW "NOTHING"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " \n"
    SELECT
      SELECT_CLAUSE
        SELECT_KW "select"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "from"
        WHITESPACE " "
        JOIN_EXPR
          FROM_ITEM
            NAME_REF
              IDENT "u"
          WHITESPACE " "
          JOIN
            JOIN_INNER
              JOIN_KW "join"
            WHITESPACE " "
            FROM_ITEM
              NAME_REF
                IDENT "i"
            WHITESPACE " \n"
            ON_CLAUSE
              ON_KW "on"
              WHITESPACE " "
              BIN_EXPR
                NAME_REF
                  CONFLICT_KW "conflict"
                WHITESPACE " "
                EQ "="
                WHITESPACE " "
                NAME_REF
                  CONFLICT_KW "conflict"
    WHITESPACE "\n"
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE "\n  "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " \n"
    SELECT
      SELECT_CLAUSE
        SELECT_KW "select"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "from"
        WHITESPACE " "
        JOIN_EXPR
          FROM_ITEM
            NAME_REF
              IDENT "u"
          WHITESPACE " "
          JOIN
            JOIN_INNER
              JOIN_KW "join"
            WHITESPACE " "
            FROM_ITEM
              NAME_REF
                IDENT "i"
            WHITESPACE " \n"
            ON_CLAUSE
              ON_KW "on"
              WHITESPACE " "
              BIN_EXPR
                NAME_REF
                  CONFLICT_KW "conflict"
                WHITESPACE " "
                EQ "="
                WHITESPACE " "
                NAME_REF
                  CONFLICT_KW "conflict"
    WHITESPACE "\n"
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "foo"
          R_PAREN ")"
      WHITESPACE "\n  "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " \n"
    SELECT
      SELECT_CLAUSE
        SELECT_KW "select"
        WHITESPACE " "
        TARGET_LIST
          TARGET
            STAR "*"
      WHITESPACE " "
      FROM_CLAUSE
        FROM_KW "from"
        WHITESPACE " "
        JOIN_EXPR
          FROM_ITEM
            NAME_REF
              IDENT "u"
          WHITESPACE " "
          JOIN
            JOIN_INNER
              JOIN_KW "join"
            WHITESPACE " "
            FROM_ITEM
              NAME_REF
                IDENT "i"
            WHITESPACE " \n"
            ON_CLAUSE
              ON_KW "on"
              WHITESPACE " "
              BIN_EXPR
                NAME_REF
                  CONFLICT_KW "conflict"
                WHITESPACE " "
                EQ "="
                WHITESPACE " "
                NAME_REF
                  CONFLICT_KW "conflict"
    WHITESPACE "\n"
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE "\n  "
      CONFLICT_ON_CONSTRAINT
        ON_KW "on"
        WHITESPACE " "
        CONSTRAINT_KW "constraint"
        WHITESPACE " "
        NAME_REF
          IDENT "temporal_rng_pk"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- on conflict do select"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "INSERT"
    WHITESPACE " "
    INTO_KW "INTO"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      R_PAREN ")"
    WHITESPACE " "
    VALUES
      VALUES_KW "VALUES"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          R_PAREN ")"
    WHITESPACE "\n    "
    ON_CONFLICT_CLAUSE
      ON_KW "ON"
      WHITESPACE " "
      CONFLICT_KW "CONFLICT"
      WHITESPACE " "
      CONFLICT_ON_INDEX
        CONFLICT_INDEX_ITEM_LIST
          L_PAREN "("
          CONFLICT_INDEX_ITEM
            NAME_REF
              IDENT "a"
          R_PAREN ")"
      WHITESPACE " "
      CONFLICT_DO_SELECT
        DO_KW "DO"
        WHITESPACE " "
        SELECT_KW "SELECT"
        WHITESPACE " "
        LOCKING_CLAUSE
          FOR_KW "FOR"
          WHITESPACE " "
          UPDATE_KW "UPDATE"
        WHITESPACE " "
        WHERE_CLAUSE
          WHERE_KW "WHERE"
          WHITESPACE " "
          BIN_EXPR
            NAME_REF
              IDENT "a"
            WHITESPACE " "
            R_ANGLE ">"
            WHITESPACE " "
            LITERAL
              INT_NUMBER "0"
    WHITESPACE " "
    RETURNING_CLAUSE
      RETURNING_KW "RETURNING"
      WHITESPACE " "
      TARGET_LIST
        TARGET
          STAR "*"
  SEMICOLON ";"
  WHITESPACE "\n"
