Closed
Description
I have a SQL query in my project that is attempting to update an array at a specific index but it is not being handled correctly. I was able to replicate this issue in a separate project and pasted the sample query below.
-- name: UpdateRow :one
update temp
set places[$1] = $2
where id=$3
RETURNING *;
The generated code treats places[$1] as an array input parameter instead of accepting $1 as the index of the places column.
Playground
https://play.sqlc.dev/p/a7c1a274a647d8c2452f4bc9cd93f8a76bf09c43745ea428859433edec18aaa1