VitessTypeToObjectID returns a type, as defined by Vitess, into a type as defined by Postgres. OIDs can be obtained with the following query: `SELECT oid, typname FROM pg_type ORDER BY 1;`
(typ sql.Type)
| 217 | // VitessTypeToObjectID returns a type, as defined by Vitess, into a type as defined by Postgres. |
| 218 | // OIDs can be obtained with the following query: `SELECT oid, typname FROM pg_type ORDER BY 1;` |
| 219 | func VitessTypeToObjectID(typ sql.Type) (uint32, error) { |
| 220 | doltgresType, err := pgtypes.FromGmsTypeToDoltgresType(typ) |
| 221 | if err != nil { |
| 222 | return 0, err |
| 223 | } |
| 224 | return id.Cache().ToOID(doltgresType.ID.AsId()), nil |
| 225 | } |
| 226 | |
| 227 | // checkCompatibleTypes checks if multiple types for which a parameter are used are compatible. |
| 228 | func checkCompatibleTypes(ctx *sql.Context, existingOid, newOid uint32, newName string) error { |
no test coverage detected