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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix pg_dump dependency on postgres.h
Date: 2007-11-14 16:47:38
Message-ID: 473B26AA.3020908@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>> Zdenek Kotala wrote:
>>> What do you mean "not very portable"? What could be problem there?
> 
>> I'm not sure.  My point is that it seems your parse.h requires
>> TYPE_IS_DECLARED, but mine doesn't.  What else could be lurking in there
>> that requires a specific fix?
> 
> The "portability" axis of concern here is portability across different
> versions of bison.  ATM I believe we work with everything from 1.875 up,
> and I'd be loath to give that up.
> 
> I concur with Alvaro that this feels like a kluge rather than a
> permanent solution.
>

But, if you look into gramparse.h it also redefine YYLTYPE for own 
purpose. It is similar mechanism. However YYSTYPE definition generates 
different storage for base_yylval. It could be problem with some 
compiler/linker. :(

Unfortunately, I don't see any solution with modification gram.y (I'm 
not bison hunter).

Another solution is what ecpg does. It has own modified copy of 
keyword.c. But it will require to keep it synchronized. Or if we put 
parentheses around all columns we don't need keyword.c. It also fix a 
problem with old dump file when we introduce new keyword in the future.

		Zdenek


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-11-14 16:50:55
Subject: Re: Fix pg_dump dependency on postgres.h
Previous:From: Bruce MomjianDate: 2007-11-14 16:42:19
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords

pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-14 16:50:55
Subject: Re: Fix pg_dump dependency on postgres.h
Previous:From: Bruce MomjianDate: 2007-11-14 16:42:19
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords

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