pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: When does Postgres use binary I/O?
Date: Sun, 22 Sep 2019 17:55:56 -0400
Message-ID: <16627.1569189356@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+renyVTMckDnUtzuAQbc+tM8zaQbojGau=8k2PqVux8QO2Vxw@mail.gmail.com>
References: <CA+renyXcVryG-x+BKoDnkFpf2PctPbB4Rv6LDHqhvQnkHWL3tw@mail.gmail.com>
	<24378.1568816806@sss.pgh.pa.us>
	<a98a96b7-ccb6-1c9f-43ec-e477a9e642be@illuminatedcomputing.com>
	<12605.1568843355@sss.pgh.pa.us>
	<21027.1569178424@sss.pgh.pa.us>
	<CA+renyVTMckDnUtzuAQbc+tM8zaQbojGau=8k2PqVux8QO2Vxw@mail.gmail.com>

Paul A Jungwirth <pj@illuminatedcomputing.com> writes:
> On Sun, Sep 22, 2019 at 11:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I thought of an easier-to-maintain approach to that part than having
>> a reference file.

> I just finished my multirange patch (well, "finished" :-), so I might
> be willing to sign up for this. Would you scatter these tests around
> in the various existing files? Or add a new cross-cutting file (like
> opr_sanity etc)?

I think adding them to the existing datatype-specific regression tests
is probably the way to go.  It seems like it'd be more likely that
someone writing a new datatype would emulate one of those test scripts
than that they'd notice they ought to add a section to some other
script.

> So you're saying the latter option is to add a new function that
> someone can call from SQL, that just round-trips a value through send
> + recv? And then call that from an ordinary regress test?

Yeah, something roughly like "send_recv_round_trip(any) returns bool",
I guess.

> I guess the
> tests themselves can't define the function (like they define
> binary_coercible), because you need to call *_recv from C, so this
> would actually be a function we ship and document, right? That seems
> within my abilities.

I'm not sure we'd want to expose it as a generally available function.
One idea is to put it in regress.c, although most of the functions
in there today are not created till create_function_1.sql which runs
too late to be useful for this.  Maybe it's okay as a core function.

> Should I move this thread over to pgsql-hackers for this?

Yeah.

			regards, tom lane





view thread (7+ messages)

Message-ID: <16627.1569189356@sss.pgh.pa.us>
Permalink:  ../16627.1569189356@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16627.1569189356@sss.pgh.pa.us

 · 

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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pj@illuminatedcomputing.com
  Subject: Re: When does Postgres use binary I/O?
  In-Reply-To: <16627.1569189356@sss.pgh.pa.us>
  References: <CA+renyXcVryG-x+BKoDnkFpf2PctPbB4Rv6LDHqhvQnkHWL3tw@mail.gmail.com> <24378.1568816806@sss.pgh.pa.us> <a98a96b7-ccb6-1c9f-43ec-e477a9e642be@illuminatedcomputing.com> <12605.1568843355@sss.pgh.pa.us> <21027.1569178424@sss.pgh.pa.us> <CA+renyVTMckDnUtzuAQbc+tM8zaQbojGau=8k2PqVux8QO2Vxw@mail.gmail.com> <16627.1569189356@sss.pgh.pa.us>

* 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