pg.ddx.io psycopg/psycopg GitHub issues and pull requests
help / color / mirror / Atom feedFrom: dvarrazzo (@dvarrazzo) <noreply+dvarrazzo@github.com>
To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>
Subject: Re: [psycopg/psycopg] issue #1040: Oddity with ltree + query in binary mode
Date: Fri, 04 Apr 2025 11:53:35 +0000
Message-ID: <gh-psycopg-psycopg-1040-c2778473376@github.com> (raw)
In-Reply-To: <gh-psycopg-psycopg-1040@github.com>
References: <gh-psycopg-psycopg-1040@github.com>
Probably it's a version indicator. The ltree module was developed by Oleg Bartunov and Teodor Sigaev, the same authors of the jsonb component, and I saw something similar: jsonb doesn't have a specific binary format but has a byte followed by the textual representation. See jsonb loader:
https://github.com/psycopg/psycopg/blob/ef3a92c8891d53cf90b1f0fa51abbe9e78bcb572/psycopg/psycopg/typ...
And yes, the source confirms that:
https://github.com/postgres/postgres/blob/7afca7edef751b8d7c0f5b6402ffcefc11c67fdd/contrib/ltree/ltr...
So, if you have your own ltree adapter already, it's easy to make your own binary loaders/dumpers: just prepend 0x01 on dump, and expect it as the first byte on load.
view thread (10+ messages) latest in thread
Message-ID: <gh-psycopg-psycopg-1040-c2778473376@github.com>
Permalink: ../gh-psycopg-psycopg-1040-c2778473376@github.com/
·
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox