Skip to content

Decode inet, pg_lsn, and ltree types on CockroachDB - #792

Merged
josevalim merged 1 commit into
elixir-ecto:masterfrom
milmazz:crdb-typsend-compat
Aug 6, 2026
Merged

Decode inet, pg_lsn, and ltree types on CockroachDB#792
josevalim merged 1 commit into
elixir-ecto:masterfrom
milmazz:crdb-typsend-compat

Conversation

@milmazz

@milmazz milmazz commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fixes a similar issue as in #791, but this time for: inet, pg_lsn, and ltree types on CockroachDB

CockroachDB generates pg_type's send/output proc names as the type name
plus "send"/"out" and only inserts an underscore for types on a
hardcoded allow-list (typeBuiltinsHaveUnderscore). Like void (fixed in
reports inetsend / pg_lsnsend / ltreesend where Postgres reports
inet_send / pg_lsn_send / ltree_send. The built-in extensions never
bind and selecting those types raises "type ... can not be handled".

Match CRDB's proc spelling in addition to Postgres'. The binary wire
formats are identical on both engines (inet uses the same
family/mask/is_cidr/addr header, pg_lsn is an int64, ltree is the
version-1-byte-plus-text format), so only the matching changes and the
Postgres path is unaffected.
@milmazz
milmazz force-pushed the crdb-typsend-compat branch from f80a409 to cc7f73b Compare August 6, 2026 17:47
@milmazz
milmazz marked this pull request as ready for review August 6, 2026 17:47
@josevalim josevalim closed this Aug 6, 2026
@josevalim josevalim reopened this Aug 6, 2026
@josevalim
josevalim merged commit 0391e5c into elixir-ecto:master Aug 6, 2026
13 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants