sql: pgwire behavior for vector types is partially incorrect #13434
Labels
A-sql-pgcompat
Semantic compatibility with PostgreSQL
A-sql-pgwire
pgwire protocol issues.
A-sql-semantics
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Milestone
Sequelize queries various
pg_catalog
tables to assemble an array of indexes, using the following query:Currently, the
pg_index.indkey
is being returned as anint[]
instead of anint2vector
, and these have different encodings. The former is an array, while the latter is a space-delimited string. As a result, Sequelize fails to parse the field. We should fixpg_index
to return the correct type.A straightforward approach to this would be to add a new OID wrapper type around DArray for this specific instance. We'd also need to allow OID Wrappers to use custom wire encodings when necessary.
On the other hand, it looks like "vector" types are common in pg_catalog tables. For instance,
pg_index
alone has 4 different fields with 2 different vector types. We may want to look into a more general approach to these types, instead of defaulting to arrays for each instance until we find that they break things.The text was updated successfully, but these errors were encountered: