Re: contrib/ltree for 7.2 or 7.3 ?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)stack(dot)net>
Subject: Re: contrib/ltree for 7.2 or 7.3 ?
Date: 2002-08-06 06:27:44
Message-ID: 200208060627.g766Ri515391@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Folks, has this been fixed?

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

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
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-06 06:43:06 DB-local usernames
Previous Message Joe Conway 2002-08-06 06:20:24 Re: FUNC_MAX_ARGS benchmarks