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
When a WITH is nested it doesn't work. The query works when running the query directly against postgres but fails when running in SQLC.
Relevant log output
/query.sql:9:1: relation "summary" does not exist
Database schema
-- Example queries for sqlcCREATETABLEauthors (
id BIGSERIALPRIMARY KEY,
name textNOT NULL,
bio text
);
SQL queries
-- name: GetAuthor :one
WITH person AS(
WITH summary AS(
WITH mb AS(
select*from authors
)
SELECT
bio
FROM mb
)
SELECTcount(*)
FROM summary
)
select*from person;
* test: Add case for #2132
* test: Add case for #2152
* test: Mark case for #2152
* test: Add case for #2187
* test: Add case for #2226
* test: Add case for #2364
* test: Add case for #2386
* test: Add case for #2538
* test: Add case for #2644
* test: Add case for #2731
Version
1.17.2
What happened?
When a WITH is nested it doesn't work. The query works when running the query directly against postgres but fails when running in SQLC.
Relevant log output
/query.sql:9:1: relation "summary" does not exist
Database schema
SQL queries
Configuration
No response
Playground URL
https://play.sqlc.dev/p/e3b1e1370d95e38ad655fb46b019f20172272b6298e112ee9bf770878979bd00
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: