Re: [HACKERS] FATAL 1:btree: items are out of order - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject Re: [HACKERS] FATAL 1:btree: items are out of order
Date
Msg-id a9eb5ef3535f28725fc847b8136dce2d
Whole thread Raw
List pgsql-hackers
Darren King wrote:
>
> >
> > Michael, do you use chars which >= 128 ?
> > If yes and you havn't USE_LOCALE defined that problems
> > with text-field come from nbtcompare.c:bttextcmp() - it uses
> >
> > char *ap, *bp;
> > ^^^^
> > (it was changed from unsigned near 20 May)
> >
> > while text funcs in varlena.c use unsigned char: UNSIGNED_CHAR_TEXT
> > is defined. (It's big inconvenience that btree in one cases use
> > funcs from nbtcompare.c and in other cases - from utils/adt/*.c)
> > Do you remember bug with btree and AbsoluteTime - the same cause!
> >
> > I hope that my assumption is right and we may have good dreams
> > with cleaned btree...
> >
> > But what should we use - signed or unsigned chars in both places
> > if USE_LOCALE is not defined ?
> >
> > We must clean this code before 6.1! It's easy.
>
> Would using unsigned chars for varlena break anything else?  If not,
> I think we should use unsigned since it is necessary for USE_LOCALE
> and wouldn't hurt if not USE_LOCALE.

I didn't change varlena but I'd change nbtcompare.c already.

Vadim

------------------------------

End of hackers-digest V1 #383
*****************************

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: [HACKERS] Re: [QUESTIONS] Reliability?
Next
From: vijaya@cse.iitb.ernet.in
Date:
Subject: [HACKERS] Re: Need 25 million hackers .......