Closed
Description
The following SQL used to cause sqlc
to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL:
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name TEXT NOT NULL,
bio TEXT
);
-- name: SubAuthors :many
SELECT sub.name FROM (SELECT * FROM authors) sub
sqlc returns the following error:
query.sql:x:y: column "name" does not exist
cc @arddor