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

Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Shigeru HANADA <hanada(at)metrosystems(dot)co(dot)jp>
Subject: Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)
Date: 2011-01-11 17:37:15
Message-ID: 4D2C954B.8050500@wulczer.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On 11/01/11 17:11, Tom Lane wrote:
> =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= <wulczer(at)wulczer(dot)org> writes:
>>> I tried wiring it into the build system, but failed, I can't figure out
>>> which Makefiles should be updated in order to make errcodes.h and
>>> plerrcodes.h generated headers. Could someone help with that?
> 
>> Trying a bit harder to make src/include/utils/errcodes.h a generated
>> file I found that it's included so early it makes the task not trivial
>> at all. postgres.h includes elog.h, which includes errcodes.h (after
>> defining the MAKE_SQLSTATE macro). I'm not sure how to proceed:
> 
> Huh?  Why in the world would the specific location of the #include have
> anything to do with the problem?

I'v having a hard time convincing make to generate errcodes.h before
compiling any .c file that includes postgres.h. The only way I found was
to make src/include/errcodes.h a dependancy of the all target.

For instance, I tried to copy the way we generate fmgroids.h and it
turned out that it doesn't work (it tries to compile things in src/port
before entering src/include, and things in src/port include postgres.h).

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-01-11 17:45:02
Subject: Re: Streaming base backups
Previous:From: Cédric VillemainDate: 2011-01-11 17:27:42
Subject: Re: Streaming base backups

pgsql-committers by date

Next:From: Tom LaneDate: 2011-01-11 17:59:36
Subject: Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)
Previous:From: Tom LaneDate: 2011-01-11 17:13:43
Subject: pgsql: Tweak create_index_paths()'s test for whether to consider abitm

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