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: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix pg_dump dependency on postgres.h
Date: 2007-11-09 17:02:27
Message-ID: 473492A3.9070900@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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. :(

I currently see two possible variant:

1) Put list of RESERVED keyword into dumputils and use bsearch for 
lookup. It is easy to implement but it will be difficult to keep 
synchronize these two list together.

2) Modify gram.y to generate parse.h which will be friendly for backend 
and can be used in keyword.c. Probably add some ifdef ...

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*

	Comments or any ideas?

		Zdenek

In response to

Responses

pgsql-hackers by date

Next:From: Zdenek KotalaDate: 2007-11-09 17:27:39
Subject: Re: New tzdata available
Previous:From: Jan UrbańskiDate: 2007-11-09 16:47:31
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords

pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-09 17:28:28
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Previous:From: Jan UrbańskiDate: 2007-11-09 16:47:31
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