Binary representation and portability

Both tpcpoint and tpcpatch support standard MobilityDB binary I/O through asBinary / tpcpointFromBinary / tpcpatchFromBinary, and through PostgreSQL's COPY ... (FORMAT BINARY). The encoding embeds the pcid of each value alongside the dimension payload, so the binary blob is unambiguous about which schema the values were written under.

Whenever the encoding backend has the schema XML for a given pcid registered in its MEOS-level schema cache (which the PG extension populates lazily on first use, scanning pointcloud_formats), the encoder additionally embeds the schema XML in the WKB blob. The MEOS_WKB_PCSCHEMAFLAG bit (0x80) in the temporal-flags byte signals this. A receiver that does not yet know the pcid — for example, a different cluster after a pg_dump --format=binary — automatically parses and registers the embedded schema, so the import succeeds without an out-of-band schema preload step.

If the encoding backend has only a parsed PCSCHEMA (no source XML) for a pcid, the schema bit is left clear and the blob is portable only between backends that share the same pointcloud_formats catalog. This matches the behaviour of the prior, schema-less encoding and is the fallback path when the cache was populated by hand from a standalone-MEOS program.

The receiver also needs mobilitydb_init to have run — automatic in any backend that has loaded the mobilitydb extension, since the function-info module installs the XML-parse hook there.