Describe the bug
Providing a type with the name event_trigger to conn.LoadType() results in an "unknown typtype" error. Following the logic of conn.LoadType(), an OID of 3838 and typtype=p are found, which seems to refer to a native Postgres type.
To Reproduce
Steps to reproduce the behavior:
Set up the environment with the provided DATABASE_URL.
Define a type named event_trigger.
Call conn.LoadType() with event_trigger.
Observe the "unknown typtype" error.
If possible, please provide a runnable example such as:
Expected behavior
The type should be loaded without causing an "unknown typtype" error.
Actual behavior
The application fails to load the type and logs an "unknown typtype" error.
Version
Go: go version go1.23.0 darwin/amd64
PostgreSQL: PostgreSQL 16
pgx: v5.7.1
Additional context
This issue is probably due to an (unintended) naming conflict with a native Postgres type. It would be helpful for other users to be aware that such conflicts can cause this error. However perhaps there also is something which can be done differently here, not sure though.
Describe the bug Providing a type with the name
event_trigger
toconn.LoadType()
results in an "unknown typtype" error. Following the logic ofconn.LoadType()
, an OID of 3838 andtyptype=p
are found, which seems to refer to a native Postgres type.To Reproduce Steps to reproduce the behavior:
DATABASE_URL
.event_trigger
.conn.LoadType()
withevent_trigger
.If possible, please provide a runnable example such as:
Expected behavior The type should be loaded without causing an "unknown typtype" error.
Actual behavior The application fails to load the type and logs an "unknown typtype" error.
Version
go version go1.23.0 darwin/amd64
PostgreSQL 16
v5.7.1
Additional context This issue is probably due to an (unintended) naming conflict with a native Postgres type. It would be helpful for other users to be aware that such conflicts can cause this error. However perhaps there also is something which can be done differently here, not sure though.