Re: Triconsistent catalog declaration - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Triconsistent catalog declaration
Date
Msg-id 5416F402.6010104@vmware.com
Whole thread Raw
In response to Triconsistent catalog declaration  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: Triconsistent catalog declaration  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Triconsistent catalog declaration
Next
From: Noah Misch
Date:
Subject: Re: orangutan seizes up during isolation-check