Re: contrib/ltree for 7.2 or 7.3 ? - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: contrib/ltree for 7.2 or 7.3 ?
Date
Msg-id 3D46E05B.1000304@stack.net
Whole thread Raw
In response to Re: contrib/ltree for 7.2 or 7.3 ?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
I'm now working on it.

Tom Lane wrote:
>>Oleg Bartunov wrote:
>>
>>>One known issue: It'll not works with 64-bit OS. We'll certainly fix this
>>>but will appreciate if somebody with access to 64-bit machine could help us.
>>
> 
> Actually, it dumps core instantly on 32-bit machines too, if they are
> pickier about alignment than Intel hardware is.  You can't map
> structures onto char[] arrays that start at odd byte offsets and not
> expect trouble.
> 
> I also do not trust macros like this:
> 
> typedef struct {
>     int32    len;
>     uint16    numlevel;
>     char    data[1];
> } ltree;
> 
> #define LTREE_HDRSIZE    ( sizeof(int32) + sizeof(uint16) )
> 
> because they take no account of the possibility of padding between fields.
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 


-- 
Teodor Sigaev
teodor@stack.net




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: contrib/ltree for 7.2 or 7.3 ?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: TPC-* Benchmarks