admin管理员组文章数量:1123103
I currently have custom types on my RDS postgres database. We used them to keep things like states and types of different items. Our code has been developed using TS and the drizzle orm and has been deployed on AWS Lambdas. When querying using this custom types the RDS client does not automatically cast this custom types as a psql client would. We get the following error:
ERROR: operator does not exist: core_backend.recurrence_status = text; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
If I explicitly cast the value in the query using CAST(status AS core_backend.recurrence_status), it works. However, this approach negates the type safety benefits of Drizzle ORM and leads to more verbose code.
Is there a way to enable automatic casting for custom types either in the RDS client configuration or within Drizzle ORM to streamline these queries while preserving type safety?
本文标签: postgresqlCasting custom types with RDS data api and Aurora postgresStack Overflow
版权声明:本文标题:postgresql - Casting custom types with RDS data api and Aurora postgres - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736546806a1944458.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论