Skip site navigation (1) Skip section navigation (2)

Re: Bug #652: NAMEDATALEN limitations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik_Erkelens(at)yahoo(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #652: NAMEDATALEN limitations
Date: 2002-04-30 18:45:53
Message-ID: 21413.1020192353@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-sql
I said:
> Although it's inefficient to declare NAMEDATALEN as not a multiple of 4
> (because of alignment considerations --- the space will just be wasted
> as pad bytes, so you might as well use it), I don't offhand know why it
> wouldn't work.

One possible theory is that if NAMEDATALEN isn't a multiple of
sizeof(int), the compiler's idea of sizeof(NameData) will probably be
NAMEDATALEN rounded up to the next multiple of sizeof(int).  However,
I still don't see exactly how that breaks anything, with the possible
exception of pg_language tuple layout --- but pg_language layout
problems wouldn't give rise to a failure during bootstrap AFAICS.
So I still don't know what the constraint mechanism really is.

BTW, I'm assuming here that alignof(int) is 4 on your platform; is it?

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-04-30 20:04:33
Subject: Re: Bug #652: NAMEDATALEN limitations
Previous:From: Tom LaneDate: 2002-04-30 18:32:57
Subject: Re: Bug #652: NAMEDATALEN limitations

pgsql-sql by date

Next:From: Tom LaneDate: 2002-04-30 20:04:33
Subject: Re: Bug #652: NAMEDATALEN limitations
Previous:From: Tom LaneDate: 2002-04-30 18:32:57
Subject: Re: Bug #652: NAMEDATALEN limitations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group