In order to use vector type of the pgvector extension, we currently need to start a temporary connection to the db to get the vector type oid and then add it in the options types. See #1041
Similar to fetchArrayTypes, it should be possible to get the oid to fill to and from properties of the custom type and thus make it look like this
let options = {
types: {
vector: {
serialize: v => JSON.stringify(v),
parse: v =>JSON.parse(v)
}
}
}
This OID lookup would only happen for types that don't have to and from defined. Or maybe only under a flag in the type definition: fetch_oid: true