On 09/15/2014 04:58 PM, Alexander Korotkov wrote:
> Hi!
>
> 9.4 GIN introduces new triconsistent method which can return one of three
> values in spite of just consistent method. But in catalog declaration
> triconsistent still returns bool type. It doesn't affect anything because
> nobody calls triconsistent from SQL.
Good point.
> But I think it would be correct to declare them returns int2.
No, int2 is two bytes wide, while the return value is a single byte. I
guess "char" would be the right type.
That makes for a bit awkward input and output from psql, when the values
used are 0, 1, 2, rather than ascii characters. But that's OK, because
as you said these functions are not callable from psql anyway, as they
have "internal" arguments.
This requires a catalog change to fix. Are we still planning to do a
catversion bump for 9.4 because of the jsonb changes?
- Heikki