Your Question

In the official documentation, there is not a specific enumeration point for the supported type types. eg: jsonb using postgresql type:jsonb Does the current support rely on tag for pg generation columns or some check checks. and some more support for postgresql features

Comment From: a631807682

We created a Github repo for customized data types collections https://github.com/go-gorm/datatypes, pull request welcome ;)

Comment From: songzhibin97

We created a Github repo for customized data types collections https://github.com/go-gorm/datatypes, pull request welcome ;)

Is there any official support other than that? I've looked at him, custom types, but it doesn't tell me what the type should be, for example I use the pgtype package, and it doesn't address my declaration of some generated columns

Comment From: a631807682

It supports some common types, such as json (jsonb in postgresql), but it does not fully support pgtype, we only support types that implement the database/sql Scanner/Valuer interface, for types that are not implemented, you need to wrap them.

We currently do not support the declaration of generated columns, you can use raw sql in the type tag, or create a feature issue to describe it, if there is enough user feedback, we may consider implementing it.

https://gorm.io/docs/data_types.html#Implements-Customized-Data-Type https://gorm.io/docs/serializer.html#content-inner