For historical reasons, now we have two differently named but similar ternary data types in TSearch and Gin text-related types. Before v13 there was also Gin's private TS_execute() version, from which we eventually shifted to Tsearch's TS_execute().
To make things more even and beautiful I've made a minor refactor to combine two left ternary types into one.
The change is simple and most of it is just the text replacement. The only thing worth noting is that some code does pointer cast between *bool and *TernaryValue so the size of them should coincide. (Declaration done in char type because simple enum on most architectures will be of int size). There is no actual change in the code despite the order of header files inclusion in some modules.