pg.ddx.io  psycopg/psycopg GitHub issues and pull requests  
help / color / mirror / Atom feed
From: 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:01:47 +0000
Message-ID: <gh-psycopg-psycopg-1040-c2778358834@github.com> (raw)
In-Reply-To: <gh-psycopg-psycopg-1040@github.com>
References: <gh-psycopg-psycopg-1040@github.com>

It is an unsupported feature. The ltree type is not known by psycopg therefore, as per documentation, it will be returned as unparsed text or as unparsed binary (see [docs](Every type returned by the query should have a [Loader](https://www.psycopg.org/psycopg3/docs/api/adapt.html#psycopg.adapt.Loader) configured, otherwise the data will be returned as unparsed str (for text results) or buffer (for binary results).)).

A (scary) long time ago I wrote an [ltree extension support module](https://github.com/dvarrazzo/py-ltree) but it is for psycopg2. I actually ported it to psycopg 3 for a private project, but haven't released the new version. It doesn't support the binary format anyway.

I can try and release such package and, if stable enough, add it to psycopg, but it will take some work and I don't have the resources to do it for free.

view thread (10+ messages)  latest in thread

Message-ID: <gh-psycopg-psycopg-1040-c2778358834@github.com>
Permalink:  ../gh-psycopg-psycopg-1040-c2778358834@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