pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgcrypto: Remove explicit hex encoding/decoding from tests
Date: Thu, 02 Dec 2021 13:30:45 -0500
Message-ID: <2116430.1638469845@sss.pgh.pa.us> (raw)
In-Reply-To: <17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee@enterprisedb.com>
References: <17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee@enterprisedb.com>

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> pgcrypto tests use encode() and decode() calls to convert to/from hex 
> encoding.  This was from before the hex format was available in bytea. 
> Now we can remove the extra explicit encoding/decoding calls and rely on 
> the default output format.

Generally +1, but I see you removed some instances of

--- ensure consistent test output regardless of the default bytea format
-SET bytea_output TO escape;

I think that the principle still applies that this should work regardless
of the installation's default bytea format, so I'd recommend putting

-- ensure consistent test output regardless of the default bytea format
SET bytea_output TO hex;

at the top of each file instead.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <2116430.1638469845@sss.pgh.pa.us>
Permalink:  ../2116430.1638469845@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2116430.1638469845@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
  Subject: Re: pgcrypto: Remove explicit hex encoding/decoding from tests
  In-Reply-To: <2116430.1638469845@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