Repository navigation
Add COMMENT ON support for views #2241
Copy link
Copy link
Closed
Labels
📚 postgresqlenhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Activity
- addedenhancementNew feature or requestNew feature or requesttriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
on Apr 28, 2023 - removedtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
on Apr 28, 2023 @mdigger What exactly would you like to change about how sqlc currently handles this?
Here's what the code outputs today https://play.sqlc.dev/p/502f584a2eda264a3f28e8e54c206bfe29306d873d8bfdce1c8a91622d0a7f0d
- addedquestionFurther information is requestedFurther information is requested
on Apr 28, 2023 // Test view type TestView struct { ID int64 Name string Bio sql.NullString }
How is it done for tables... :)
Please take a look at the link I shared, as sqlc does exactly this.
https://play.sqlc.dev/p/47cebd466b443ee4bb73a1986990c5a6a30780c2b2b8903d27e3e51624bbd8df
// Author table comment type Author struct {...} type TestView struct {...}
There is no comment on structure
TestViewinmodels.go.Reacted by Kyle GrayIndeed there isn't!
- changed the title
[-]Use comment on view[/-][+]Add COMMENT ON support for views[/+]on Apr 28, 2023 - added a commit that references this issue
on May 2, 2023 - added a commit that references this issue
on Jun 6, 2023 - added a commit that references this issue
on Oct 13, 2025
Metadata
Metadata
Assignees
Labels
📚 postgresqlenhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
What do you want to change?
Use comment to generate model by
view.The generated struct should have a comment before it like so:
No comment currently shows up.
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go