Re: how to run encoding-dependent tests by default

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to run encoding-dependent tests by default
Date: 2019-06-23 19:44:15
Message-ID: 4be39f66-8adc-a10f-6d2c-1ab35f2953a1@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-06-17 18:39, Andres Freund wrote:
> Basically something like:
>
> \gset SELECT my_encodings_are_compatible() AS compatible
> \if :compatible
> test;
> contents;
> \endif

Cool, that works out quite well. See attached patch. I flipped the
logic around to make it \quit if not compatible. That way the
alternative expected file is shorter and doesn't need to be updated all
the time. But it gets the job done either way.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Run-UTF8-requiring-collation-tests-by-default.patch text/plain 6.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2019-06-23 19:48:26 Re: Choosing values for multivariate MCV lists
Previous Message James Coleman 2019-06-23 19:22:04 Misleading comment in tuplesort_set_bound