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

Re: Fix pg_dump dependency on postgres.h

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To:
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix pg_dump dependency on postgres.h
Date: 2007-11-14 14:14:45
Message-ID: 473B02D5.8020200@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Zdenek Kotala wrote:
> Zdenek Kotala wrote:
>> Attached patch removes pg_dump dependency on postgres.h. The main 
>> reason for that was discussed there:
>>
>> http://archives.postgresql.org/pgsql-hackers/2007-10/msg01261.php
>>
> 
> I found two problems there. One is that I forgot postgres.h include in 
> common.c. it is easy to fix. However second problem is more complicated. 
> dumputils.c calls ScandKeywordLookup function which is defined in 
> keyword.c. :(
> 

<snip>

> 3) Put following fake into keyword.c before include "parse.h" line. It 
> is easiest way.
> 
> #define TYPE_IS_DECLARED 1
> #define YYLTYPE_IS_DECLARED 1
> #define YYLTYPE void*
> #define YYSTYPE void*
> 

New version of patch is attached. I selected variant 3 as a best 
solution. Patch also fix some other postgres.h dependencyin another 
tools such as pg_controldata, pg_config. The last unfixed tool is 
pg_resetxlog which deserves own patch.


		With regards Zdenek

Attachment: pg_dump_02.patch
Description: text/x-patch (53.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2007-11-14 14:33:03
Subject: Re: Fix pg_dump dependency on postgres.h
Previous:From: Bruce MomjianDate: 2007-11-14 13:24:43
Subject: Re: Simplifying Text Search

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2007-11-14 14:33:03
Subject: Re: Fix pg_dump dependency on postgres.h
Previous:From: Heikki LinnakangasDate: 2007-11-14 12:08:38
Subject: Re: Miscalculation in IsCheckpointOnSchedule()

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