Open
Description
Version
1.28.0
What happened?
Reproduction:
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
bio text
);
-- name: GetAuthor :one
WITH author as (
SELECT * FROM authors
WHERE id = $1
)
SELECT * from author;
The return type of the generated function is SelectCteTestRow
- not Author
although it's actually returning a Author
.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/0d129e7ba6230256015139134fbdadb991601360635c1983117970d299b3df9e
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go