MaybeSetCustomOid checks whether t has a special oid that we want to set into d. Must be kept in sync with DArray.ResolvedType. Returns an error if t is not an array type.
(t *types.T)
| 5020 | // d. Must be kept in sync with DArray.ResolvedType. Returns an error if t is |
| 5021 | // not an array type. |
| 5022 | func (d *DArray) MaybeSetCustomOid(t *types.T) error { |
| 5023 | if t.Family() != types.ArrayFamily { |
| 5024 | return errors.AssertionFailedf("expected array type, got %s", t.SQLStringForError()) |
| 5025 | } |
| 5026 | switch t.Oid() { |
| 5027 | case oid.T_int2vector: |
| 5028 | d.customOid = oid.T_int2vector |
| 5029 | case oid.T_oidvector: |
| 5030 | d.customOid = oid.T_oidvector |
| 5031 | } |
| 5032 | return nil |
| 5033 | } |
| 5034 | |
| 5035 | // ResolvedType implements the TypedExpr interface. Must be kept in sync with |
| 5036 | // DArray.MaybeSetCustomOid. |
nothing calls this directly
no test coverage detected