sqlc
sqlc copied to clipboard
Sql WITH query - not parsing 'delete'
Version
1.11.0
What happened?
sqlc generate not working with this particular 'with' case.
Relevant log output
dept_list.sql:1:1: relation "dept" does not exist
Database schema
CREATE TABLE company
(
id uuid,
name text
);
CREATE TABLE department
(
id uuid,
name text
);
SQL queries
WITH dept AS (
select name from department
)
delete from company where name in (select name from dept);
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
i can confirm i also ran into this bug
This works as of sqlc 1.21 https://play.sqlc.dev/p/f0f1bdc5bbfa7026995ef8eb8797a6e7621f29fa9df6f16d1095bf465a7856b0