Open nicois opened 1 month ago
Would it be possible to, one way or another, allow Type to be serialised?
Yes, but it seems rather error prone. I'm more inclined to improve performance of loading types like you recommended in https://github.com/jackc/pgx/issues/2030. Also, only bug fixes to this older version.
I am using pgx(pool) with a database where there are a lot of custom types which need registering. Even using some smarts to only register the types actually used by a given application, it still takes multiple seconds to collect all the
*pgtype.Type
values. While this is acceptable for non-interactive long-running applications, this reduces the viability of using pgx to build command-line tools. I have tried to mitigate this problem by caching the results ofLoadType
, but I see:Would it be possible to, one way or another, allow
Type
to be serialised?