pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support for binary I/O of ltree, lquery, and ltxtquery types
Date: Wed, 01 Apr 2020 21:32:02 +0000
Message-ID: <E1jJkxu-0005HI-SY@gemulon.postgresql.org> (raw)

Add support for binary I/O of ltree, lquery, and ltxtquery types.

Not much to say here --- does what it says on the tin.  The "binary"
representation in each case is really just the same as the text format,
though we prefix a version-number byte in case anyone ever feels
motivated to change that.  Thus, there's not any expectation of improved
speed or reduced space; the point here is just to allow clients to use
binary format for all columns of a query result or COPY data.

This makes use of the recently added ALTER TYPE support to add binary
I/O functions to an existing data type.  As in commit a80818605,
we can piggy-back on there already being a new-for-v13 version of the
ltree extension, so we don't need a new update script file.

Nino Floris, reviewed by Alexander Korotkov and myself

Discussion: https://postgr.es/m/CANmj9Vxx50jOo1L7iSRxd142NyTz6Bdcgg7u9P3Z8o0=HGkYyQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/949a9f043eb70a4986041b47513579f9a13d6a33

Modified Files
--------------
contrib/ltree/crc32.c             |   4 +-
contrib/ltree/crc32.h             |   2 +-
contrib/ltree/ltree--1.1--1.2.sql |  37 +++++++
contrib/ltree/ltree_io.c          | 205 +++++++++++++++++++++++++++++++++-----
contrib/ltree/ltxtquery_io.c      |  73 +++++++++++++-
5 files changed, 288 insertions(+), 33 deletions(-)



Message-ID: <E1jJkxu-0005HI-SY@gemulon.postgresql.org>
Permalink:  ../E1jJkxu-0005HI-SY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jJkxu-0005HI-SY@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add support for binary I/O of ltree, lquery, and ltxtquery types
  In-Reply-To: <E1jJkxu-0005HI-SY@gemulon.postgresql.org>
  References: <E1jJkxu-0005HI-SY@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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