Skip to content

Commit

Permalink
sql/postgres: more flexiable support for udf types (#2920)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m authored Jul 3, 2024
1 parent 2cdfe29 commit 1f36577
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sql/postgres/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,16 @@ func columnType(c *columnDesc) (schema.Type, error) {
case typeOID, typeRegClass, typeRegCollation, typeRegConfig, typeRegDictionary, typeRegNamespace,
typeRegOper, typeRegOperator, typeRegProc, typeRegProcedure, typeRegRole, typeRegType:
typ = &OIDType{T: t}
case TypeUserDefined:
typ = &UserDefinedType{T: c.fmtype}
case typeAny, typeAnyElement, typeAnyArray, typeAnyNonArray, typeAnyEnum, typeInternal,
typeRecord, typeTrigger, typeEventTrigger, typeVoid, typeUnknown:
typ = &PseudoType{T: t}
// TypeUserDefined or any other base type.
default:
typ = &schema.UnsupportedType{T: t}
ft := c.fmtype
if ft == "" {
ft = t
}
typ = &UserDefinedType{T: ft}
}
switch c.typtype {
case "d", "e":
Expand Down

0 comments on commit 1f36577

Please sign in to comment.