pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: David Fetter <david@fetter.org>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH v4] Add \warn to psql
Date: Fri, 05 Jul 2019 12:48:10 -0400
Message-ID: <28340.1562345290@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.21.1907031618140.16913@lancre>
References: <20190427171548.GM28936@fetter.org>
	<alpine.DEB.2.21.1904272158120.29865@lancre>
	<20190428145813.GO28936@fetter.org>
	<alpine.DEB.2.21.1904282015420.29865@lancre>
	<20190429041106.GB2954@fetter.org>
	<alpine.DEB.2.21.1904290822470.8815@lancre>
	<20190429141710.GD2954@fetter.org>
	<10811be6-cd8d-eadb-9b70-7a6e72ed4ee5@gmail.com>
	<alpine.DEB.2.21.1904301543350.24513@lancre>
	<CAKNkYnz8_wOhuHFp953LEvpsStB9Scyikz4HosSk3Q0w1Fa9Pw@mail.gmail.com>
	<20190501073857.GY28936@fetter.org>
	<11038.1562098250@sss.pgh.pa.us>
	<alpine.DEB.2.21.1907030842030.17242@lancre>
	<31001.1562162768@sss.pgh.pa.us>
	<alpine.DEB.2.21.1907031618140.16913@lancre>

Fabien COELHO <coelho@cri.ensmp.fr> writes:
> I agree that using TAP test if another simpler option is available is not 
> a good move.

> However, in the current state, as soon as there is some variation a test 
> is removed and coverage is lost, but they could be kept if the check could 
> be against a regexp.

I'm fairly suspicious of using TAP tests just to get a regexp match.
The thing I don't like about TAP tests for this is that they won't
notice if the test case prints extra stuff beyond what you were
expecting --- at least, not without care that I don't think we usually
take.

I've thought for some time that we should steal an idea from MySQL
and extend pg_regress so that individual lines of an expected-file
could have regexp match patterns rather than being just exact matches.
I'm not really sure how to do that without reimplementing diff(1)
for ourselves :-(, but that would be a very large step forward if
we could find a reasonable implementation.

Anyway, my opinion about having TAP test(s) for psql remains that
it'll be a good idea as soon as somebody submits a test that adds
a meaningful amount of code coverage that way (and the coverage
can't be gotten more simply).  But we don't need a patch that is
just trying to get the camel's nose under the tent.

			regards, tom lane





view thread (26+ messages)  latest in thread

Message-ID: <28340.1562345290@sss.pgh.pa.us>
Permalink:  ../28340.1562345290@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28340.1562345290@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, coelho@cri.ensmp.fr, david@fetter.org, a.zakirov@postgrespro.ru, corey.huinker@gmail.com
  Subject: Re: [PATCH v4] Add \warn to psql
  In-Reply-To: <28340.1562345290@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