Title: omit_unused_structs ignore enums when it is referenced in an array · Issue #3978 · sqlc-dev/sqlc · GitHub
Open Graph Title: omit_unused_structs ignore enums when it is referenced in an array · Issue #3978 · sqlc-dev/sqlc
X Title: omit_unused_structs ignore enums when it is referenced in an array · Issue #3978 · sqlc-dev/sqlc
Description: Version 1.29.0 What happened? When omit_unused_structs is set, it doesn't generate the Go type for a Postgresql ENUM if the enum is referenced in a table as an array Relevant log output Database schema CREATE TYPE enum_type AS ENUM('a','...
Open Graph Description: Version 1.29.0 What happened? When omit_unused_structs is set, it doesn't generate the Go type for a Postgresql ENUM if the enum is referenced in a table as an array Relevant log output Database sc...
X Description: Version 1.29.0 What happened? When omit_unused_structs is set, it doesn't generate the Go type for a Postgresql ENUM if the enum is referenced in a table as an array Relevant log output Databas...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3978
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"omit_unused_structs ignore enums when it is referenced in an array","articleBody":"### Version\n\n1.29.0\n\n### What happened?\n\nWhen `omit_unused_structs` is set, it doesn't generate the Go type for a Postgresql `ENUM` if the enum is referenced in a table as an array\n\n### Relevant log output\n\n```shell\n\n```\n\n### Database schema\n\n```sql\nCREATE TYPE enum_type AS ENUM('a','b');\n\nCREATE TABLE foobar (\n types enum_type[] not null\n);\n```\n\n### SQL queries\n\n```sql\n-- name: List :many\nSELECT * FROM foobar;\n```\n\n### Configuration\n\n```yaml\n{\n \"version\": \"2\",\n \"sql\": [{\n \"schema\": \"schema.sql\",\n \"queries\": \"query.sql\",\n \"engine\": \"postgresql\",\n \"gen\": {\n \"go\": {\n \"out\": \"db\",\n \"omit_unused_structs\": true\n }\n }\n }]\n}\n```\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/0c1fceceeca7b3984de0cf7b28872931ca121211a8ba25c21e11e802b44dea59\n\n### What operating system are you using?\n\nLinux\n\n### What database engines are you using?\n\nPostgreSQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/pengux","@type":"Person","name":"pengux"},"datePublished":"2025-06-02T19:20:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3978/sqlc/issues/3978"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5870e2d6-009b-1ee4-104d-c8e2adf06df4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC76:2C466E:76BEE:9EABF:6A517F6A |
| html-safe-nonce | a5ffc399f9880935643b79fe15037cc378303b11c28606c540c7a24442e7a486 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzc2OjJDNDY2RTo3NkJFRTo5RUFCRjo2QTUxN0Y2QSIsInZpc2l0b3JfaWQiOiIxODI4OTcxODYwMTE0NjM2NjUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a1344f9c3ce23808a190af76baa33fc3c35f5656e488517c915179e45377838b |
| hovercard-subject-tag | issue:3111343444 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/3978/issue_layout |
| twitter:image | https://opengraph.githubassets.com/37d1af0af12410f1062dfae837356ce74241b21e3571694d1f925dfff0e38785/sqlc-dev/sqlc/issues/3978 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/37d1af0af12410f1062dfae837356ce74241b21e3571694d1f925dfff0e38785/sqlc-dev/sqlc/issues/3978 |
| og:image:alt | Version 1.29.0 What happened? When omit_unused_structs is set, it doesn't generate the Go type for a Postgresql ENUM if the enum is referenced in a table as an array Relevant log output Database sc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pengux |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d01c62704ef24df49056c63892a149b775e1353d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width