You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use :copyfrom to insert primary key values. sqlc generates an incorrect column name for the primary key field, breaking the query. I made a minimal example to reproduce this, which, when generating code to populate author.author_id results in the error:
ERROR: column "authorID" does not exist (SQLSTATE 42703)
i.e. the author_id column was incorrectly renamed to authorID.
The specific incorrect code is at line 41 in the generated example/copyfrom.go:
Version
1.17.2
What happened?
I want to use
:copyfrom
to insert primary key values.sqlc
generates an incorrect column name for the primary key field, breaking the query. I made a minimal example to reproduce this, which, when generating code to populateauthor.author_id
results in the error:i.e. the
author_id
column was incorrectly renamed toauthorID
.The specific incorrect code is at line 41 in the generated
example/copyfrom.go
:Here the incorrect column is visible in the third argument to
q.db.CopyFrom
.Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/e9e0f5f0257534acf1eb8864a3c36d3089b64f7c0b28f12264ae4494595dffb8
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: