Re: attoptions

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: attoptions
Date: 2010-01-20 06:02:49
Message-ID: 34d269d41001192202q471e9abdu2c2f87c1500c2db1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 19, 2010 at 13:06, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Jan 15, 2010 at 12:52 AM, Alex Hunsaker <badalex(at)gmail(dot)com> wrote:
>> ***************
>> *** 152,158 **** CATALOG(pg_attribute,1249) BKI_BOOTSTRAP
>> BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK
>>        aclitem         attacl[1];
>>
>>        /* Column-level options */
>> !       aclitem         attoptions[1];
>>  } FormData_pg_attribute;
>>
>>  /*
>> --- 152,158 ----
>>        aclitem         attacl[1];
>>
>>        /* Column-level options */
>> !       text            attoptions[1];
>>  } FormData_pg_attribute;
>>
>>  /*
>
> Unfortunately this change (which is obviously correct and necessary)
> breaks the build on src/backend/catalog/heap.c with:
>
> heap.c:122: error: missing braces around initializer
> heap.c:122: error: (near initialization for ‘a1.attoptions[0]’)

Huh. I must have not done an --enable-depend build :( Even so after
a make clean I just get warnings...
This is with gcc version 4.4.2 20091208 (prerelease) (GCC)

Well for grins I tried changing it to the obvious {{{0}, {0}}} as the
places that seem to use it mark it as "null" anyway (see heap.c
InsertPgAttributeTupe ~525).

But then relcache.c gets more warnings:
relcache.c:87: warning: missing braces around initialize
relcache.c:87: warning: (near initialization for
‘Desc_pg_class[0].attoptions[0]’)
relcache.c:88: warning: missing braces around initialize
...

Which comes from genbki.pl. Seems we are stuck with:
1) the non portable
$row->{attoptions} = q|.attoptions = { {0}, {0} }|;

2) just dont initialize as nothing seems need it (*note* I have not
looked very hard)
$row->{attoptions} = q||;

Thoughts? Id rather not have this useful patch fall on the floor
because of a stupid limitation like this :)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2010-01-20 06:04:49 Re: MonetDB test says that PostgreSQL often has errors or missing results
Previous Message Josh Berkus 2010-01-20 05:56:17 Re: MonetDB test says that PostgreSQL often has errors or missing results