Re: [v9.2] DROP statement reworks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.2] DROP statement reworks
Date: 2011-10-10 14:26:23
Message-ID: CA+TgmoZUu44Uuuos9DBzx3gmSansfQ6WkUWSJLQLCkTtvp0Bww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 10, 2011 at 9:39 AM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> 2011/10/10 Robert Haas <robertmhaas(at)gmail(dot)com>:
>> On Wed, Oct 5, 2011 at 2:58 PM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
>>> Hmm. It indeed makes translation hard.
>>> I reverted this portion of the part-2 patch, as attached.
>>> Please review the newer one, instead of the previous revision.
>>
>> Please fix the compiler warnings.
>>
> I checked compiler warnings using COPT=-Werror, but it detects warning on
> only unrelated files as below. Does it really come from my patches?
> (Does it depend on ./configure options?)

OK, well, I applied pgsql-v9.2-drop-reworks-2.v4.1.patch and tried to
compile, and got this:

In file included from ../../../src/include/catalog/dependency.h:17,
from dependency.c:19:
../../../src/include/catalog/objectaddress.h:21: warning: type
defaults to ‘int’ in declaration of ‘ObjectAddress’
../../../src/include/catalog/objectaddress.h:21: error: expected ‘;’,
‘,’ or ‘)’ before ‘*’ token

The problem here is pretty obvious: you've defined
get_object_namespace, which takes an argument of type ObjectAddress,
before defining the ObjectAddress datatype, which is the next thing in
the same header file. How does that even compile for you?

That's easy enough to fix, but then I get this:

objectaddress.c: In function ‘get_object_namespace’:
objectaddress.c:996: warning: implicit declaration of function
‘get_object_property_attnum_namespace’
objectaddress.c:1000: warning: implicit declaration of function
‘get_object_property_catid_by_oid’
objectaddress.c:1006: warning: implicit declaration of function
‘get_object_property_typetext’
objectaddress.c:1006: warning: format ‘%s’ expects type ‘char *’, but
argument 3 has type ‘int’

Maybe the problem here is that I've only applied the first patch, and
this stuff is cleaned up in the later patches in the series. But what
is the point of separating out the patches if you can't even compile
with only some of them applied?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message pasman pasmański 2011-10-10 14:27:55 Re: Extend file_fdw wrapper
Previous Message Andrew Dunstan 2011-10-10 14:23:51 Re: Extend file_fdw wrapper