You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catalog: add pg_type.typsend and type typreceive as regproc
The Apache Arrow ADBC PostgreSQL driver runs a type-resolution query at
connect time that references pg_catalog.pg_type.typsend. Materialize did
not expose that column, so every adbc_driver_postgresql connection failed
with `column "typsend" does not exist` before any user query ran.
Carry the real PostgreSQL typsend OID per builtin type, verified against a
live PostgreSQL 16 server for all 76 types that have a PG counterpart. Nine
types get 0, matching PostgreSQL, which gives them no binary send function.
_mz_aclitem is Materialize-invented and takes array_send by analogy with
every other array type.
typsend is appended to mz_internal.mz_type_pg_metadata, then projected
through mz_internal.pg_type_all_databases and pg_catalog.pg_type. The new
columns are appended rather than placed at PostgreSQL's ordinal positions,
so existing column positions stay stable.
pg_catalog.pg_type.typreceive also becomes regproc, which is what
PostgreSQL declares and what lets a client's typreceive::TEXT comparison
resolve a function name instead of digits. The underlying all-databases
view keeps oid, because it backs a builtin index and resolving a regproc to
a name reads current_database(), which is not materializable.
Adds a test/adbc mzcompose suite covering the driver end to end. Connecting
and streaming rows are hard assertions. Full Arrow type fidelity is not yet
reachable, because Materialize encodes regproc over pgwire as a bare OID
rather than as the function name, so the driver's name-keyed type map
misses and every column resolves to Arrow binary. Those tests are marked
expectedFailure so they report an unexpected success once that encoding is
fixed.
0 commit comments