Version
v1.13.0 and 6e45a9f
What happened?
Almost the exactly like #1290, it seems like "sql_package": "pgx/v4" is the cause.
The generated Go code redeclares id on line 3:
func (q *Queries) GetUser(ctx context.Context, id string) (string, error) {
row := q.db.QueryRow(ctx, getUser, id)
var id string
err := row.Scan(&id)
return id, err
}
Relevant log output
No response
Database schema
-- Example queries for sqlc
CREATE TABLE public.users (
id character varying(64) NOT NULL
);
SQL queries
-- name: GetUser :one
SELECT *
FROM users
WHERE id = $1
LIMIT 1;
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql",
"sql_package": "pgx/v4"
}
]
}
Playground URL
https://play.sqlc.dev/p/07a36257aa58677adfa4d2558864d0a09ccc286c487893d5854978684b9babe5
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Version
v1.13.0 and 6e45a9f
What happened?
Almost the exactly like #1290, it seems like
"sql_package": "pgx/v4"is the cause.The generated Go code redeclares
idon line 3:Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/07a36257aa58677adfa4d2558864d0a09ccc286c487893d5854978684b9babe5
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go