mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
Reduce the need for frontend programs to include "postgres.h" by refactoring
inclusions in src/include/catalog/*.h files. The main idea here is to push function declarations for src/backend/catalog/*.c files into separate headers, rather than sticking them into the corresponding catalog definition file as has been done in the past. This commit only carries out that idea fully for pg_proc, pg_type and pg_conversion, but that's enough for the moment --- if pg_list.h ever becomes unsafe for frontend code to include, we'll need to work a bit more. Zdenek Kotala
This commit is contained in:
@@ -3,25 +3,34 @@
|
||||
* keywords.c
|
||||
* lexical token lookup for key words in PostgreSQL
|
||||
*
|
||||
* NB: This file is also used by pg_dump.
|
||||
*
|
||||
*
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.194 2008/01/01 19:45:50 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.195 2008/03/27 03:57:33 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
/* Use c.h so that this file can be built in either frontend or backend */
|
||||
#include "c.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "parser/gramparse.h" /* required before parser/parse.h! */
|
||||
/*
|
||||
* This macro definition overrides the YYSTYPE union definition in parse.h.
|
||||
* We don't need that struct in this file, and including the real definition
|
||||
* would require sucking in some backend-only include files.
|
||||
*/
|
||||
#define YYSTYPE int
|
||||
|
||||
#include "parser/keywords.h"
|
||||
#include "parser/parse.h"
|
||||
|
||||
/* NB: This file is also used by pg_dump. */
|
||||
|
||||
/*
|
||||
* List of keyword (name, token-value, category) entries.
|
||||
|
||||
Reference in New Issue
Block a user