Re: Triconsistent catalog declaration

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Triconsistent catalog declaration
Date: 2014-09-15 14:13:22
Message-ID: 5416F402.6010104@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2014-09-15 14:22:13 Re: orangutan seizes up during isolation-check
Previous Message Alexander Korotkov 2014-09-15 13:58:11 Triconsistent catalog declaration