© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
DT
Drizzle Team
•
10mo ago
bc 🐧🪺
Generated Column Unique Constraint
The Drizzle docs on generated columns
(
https://orm.drizzle.team/docs/generated-columns
)
, for Postgres
, say
"Cannot directly use in primary keys
, foreign keys
, or unique constraints
"
Does this mean that generated columns cannot have unique constraints generated in the SQL
?
The postgres docs
(
https://www.postgresql.org/docs/current/ddl-generated-columns.html
) are linked
, but I don
't see any mention about unique constraints being unsupported there
. Is this then a limitation of Drizzle
, or is it a Postgres limitation after all
?
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Unique Constraint
DT
Drizzle Team / help
16mo ago
conditional unique constraint
DT
Drizzle Team / help
2y ago
Weird unique constraint
DT
Drizzle Team / help
2y ago
MySQL unique constraint
DT
Drizzle Team / help
3y ago