Re: how to run encoding-dependent tests by default - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: how to run encoding-dependent tests by default
Date
Msg-id 440c67f5-778b-8b80-0915-24d5c99e68a6@2ndquadrant.com
Whole thread Raw
In response to Re: how to run encoding-dependent tests by default  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: how to run encoding-dependent tests by default  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2019-06-23 21:44, Peter Eisentraut wrote:
> 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.

Small patch update: The collate.linux.utf8 test also needs to check in a
similar manner that all the locales it is using are installed.  This
should get the cfbot run passing.

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

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: range_agg
Next
From: Jose Luis Tallon
Date:
Subject: Re: [PATCH] Implement uuid_version()