diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index cf119de..e8c9b6f 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -311,7 +311,7 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi builder := strings.Builder{} builder.WriteString("INSERT INTO NewTasks (InstanceID, EventPayload) VALUES ") for i := 0; i < newActivityCount; i++ { - builder.WriteString(fmt.Sprintf("($%d, $%d)", 3*i+1, 3*i+2)) + builder.WriteString(fmt.Sprintf("($%d, $%d)", 2*i+1, 2*i+2)) if i < newActivityCount-1 { builder.WriteString(", ") }