Closed mgoldenbe closed 12 months ago
This is really independent of the pg_tle project, but could be packaged as a tle. It really comes done to how the numbers are encoded in the bytea column. You could write a simple function that loops though all the bytes in the byte array and then cast each one to an int. Then add each int to the int[].
My table in AWS RDS Postgres has a column of type
bytea
, which encodes vectors of numbers in the range from -128 to 127. I need to convert these values ofbytea
type intovector
in order to use the distances defined by thepgvector
extension. I understand that I need to usepg_tle
to create such a cast. Could you please provide me with a direction for doing this? If a direct cast is not possible, then a cast toint[]
would do, because that can be casted tovector
.