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 creating an insert query using a CTE results in an error. The relation with the CTE does not exist, according to sqlc:
relation "potential_authors" does not exist
I've recreated a simplified version of the issue in the playground.
Relevant log output
Database schema
CREATETABLEauthors (
id BIGSERIALPRIMARY KEY,
name textNOT NULL,
bio text
);
CREATETABLEdummy (
id BIGSERIALPRIMARY KEY,
name textNOT NULL,
bio text
);
SQL queries
-- name: CreateAuthor :execINSERT INTO authors
WITH potential_authors AS (
SELECT id, name, bio
FROM dummy
)
SELECT id, name, bio
FROM potential_authors;
Version
1.28.0
What happened?
When creating an insert query using a CTE results in an error. The relation with the CTE does not exist, according to sqlc:
relation "potential_authors" does not exist
I've recreated a simplified version of the issue in the playground.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/39948b645032d9910dee27400711e18e91a35b803282bc256bee82afa681bff8
What operating system are you using?
Linux
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: