Title: Casing issue with DROP TABLE statement ... · Issue #3936 · sqlc-dev/sqlc · GitHub
Open Graph Title: Casing issue with DROP TABLE statement ... · Issue #3936 · sqlc-dev/sqlc
X Title: Casing issue with DROP TABLE statement ... · Issue #3936 · sqlc-dev/sqlc
Description: Version 1.29.0 What happened? If schema.sql contains a mixed case table name, you can only drop the table using lowercase name, otherwise, you get a relation " Open Graph Description: Version 1.29.0 What happened? If schema.sql contains a mixed case table name, you can only drop the table using lowercase name, otherwise, you get a relation " X Description: Version 1.29.0 What happened? If schema.sql contains a mixed case table name, you can only drop the table using lowercase name, otherwise, you get a relation "<table name>" does not...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3936
X: @github
Domain: github.com
" does not exist. The following schema.sql illustrates the problem...
" does not exist. The foll...
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Casing issue with DROP TABLE statement ...","articleBody":"### Version\n\n1.29.0\n\n### What happened?\n\nIf schema.sql contains a mixed case table name, you can only drop the table using lowercase name, otherwise, you get a relation `\"\u003ctable name\u003e\" does not exist`. The following schema.sql illustrates the problem:\n\n```\nCREATE TABLE Authors (\n id INTEGER PRIMARY KEY,\n name text NOT NULL\n);\n\nDROP TABLE Authors; -- generates relation \"Authors\" does not exist error\n```\n\nChanging the drop statement to `DROP TABLE authors` fixes the reported error.\n\nThe bug first appeared in 1.28.0 and continues to exist in 1.29.0\n\n### Relevant log output\n\n```shell\n# package tutorial\nschema.sql:1:1: relation \"Authors\" does not exist\nschema.sql:1:1: relation \"authors\" already exists\n```\n\n### Database schema\n\n```sql\nCREATE TABLE Authors (\n id INTEGER PRIMARY KEY,\n name text NOT NULL\n);\n\nDROP TABLE Authors;\n\nCREATE TABLE Authors (\n id INTEGER PRIMARY KEY,\n name text NOT NULL,\n bio text\n);\n```\n\n### SQL queries\n\n```sql\n\n```\n\n### Configuration\n\n```yaml\nversion: \"2\"\nsql:\n - engine: \"sqlite\"\n queries: \"query.sql\"\n schema: \"schema.sql\"\n gen:\n go:\n package: \"tutorial\"\n out: \"tutorial\"\n```\n\n### Playground URL\n\n_No response_\n\n### What operating system are you using?\n\nmacOS\n\n### What database engines are you using?\n\nSQLite\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/TorrinLynn","@type":"Person","name":"TorrinLynn"},"datePublished":"2025-04-19T00:29:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/3936/sqlc/issues/3936"}