head	1.53;
access;
symbols
	REL9_0_0:1.53
	REL9_1_ALPHA1:1.53
	REL9_0_RC1:1.53
	REL9_0_BETA4:1.53
	REL9_0_STABLE:1.53.0.6
	REL9_0_BETA3:1.53
	REL9_0_BETA2:1.53
	REL7_4_29:1.41
	REL8_0_25:1.42
	REL8_1_21:1.42
	REL8_2_17:1.44
	REL8_3_11:1.45
	REL8_4_4:1.49
	REL9_0_BETA1:1.53
	REL9_0_ALPHA5_BRANCH:1.53.0.4
	REL9_0_ALPHA5:1.53
	REL7_4_28:1.41
	REL8_0_24:1.42
	REL8_1_20:1.42
	REL8_2_16:1.44
	REL8_3_10:1.45
	REL8_4_3:1.49
	REL9_0_ALPHA4:1.53
	REL9_0_ALPHA4_BRANCH:1.53.0.2
	REL8_5_ALPHA3:1.52
	REL8_5_ALPHA3_BRANCH:1.52.0.2
	REL7_4_27:1.41
	REL8_0_23:1.42
	REL8_1_19:1.42
	REL8_2_15:1.44
	REL8_3_9:1.45
	REL8_4_2:1.49
	REL8_5_ALPHA2:1.51
	REL8_5_ALPHA2_BRANCH:1.51.0.2
	REL7_4_26:1.41
	REL8_0_22:1.42
	REL8_1_18:1.42
	REL8_2_14:1.44
	REL8_3_8:1.45
	REL8_4_1:1.49
	REL8_5_ALPHA1:1.49
	REL8_5_ALPHA1_BRANCH:1.49.0.4
	REL8_4_STABLE:1.49.0.2
	REL8_4_0:1.49
	REL8_4_RC2:1.49
	REL8_4_RC1:1.49
	REL8_4_BETA2:1.49
	REL8_4_BETA1:1.49
	REL7_4_25:1.41
	REL8_0_21:1.42
	REL8_1_17:1.42
	REL8_2_13:1.44
	REL8_3_7:1.45
	REL7_4_24:1.41
	REL8_0_20:1.42
	REL8_1_16:1.42
	REL8_2_12:1.44
	REL8_3_6:1.45
	REL7_4_23:1.41
	REL8_0_19:1.42
	REL8_1_15:1.42
	REL8_2_11:1.44
	REL8_3_5:1.45
	REL7_4_22:1.41
	REL8_0_18:1.42
	REL8_1_14:1.42
	REL8_2_10:1.44
	REL8_3_4:1.45
	REL7_4_21:1.41
	REL8_0_17:1.42
	REL8_1_13:1.42
	REL8_2_9:1.44
	REL8_3_3:1.45
	REL7_4_20:1.41
	REL8_0_16:1.42
	REL8_1_12:1.42
	REL8_2_8:1.44
	REL8_3_2:1.45
	REL8_2_7:1.44
	REL8_3_1:1.45
	REL8_3_STABLE:1.45.0.2
	REL8_3_0:1.45
	REL8_3_RC2:1.45
	REL7_3_21:1.38.2.1
	REL7_4_19:1.41
	REL8_0_15:1.42
	REL8_1_11:1.42
	REL8_2_6:1.44
	REL8_3_RC1:1.45
	REL8_3_BETA4:1.45
	REL8_3_BETA3:1.45
	REL8_3_BETA2:1.45
	REL8_3_BETA1:1.45
	REL7_3_20:1.38.2.1
	REL7_4_18:1.41
	REL8_0_14:1.42
	REL8_1_10:1.42
	REL8_2_5:1.44
	REL7_3_19:1.38.2.1
	REL7_4_17:1.41
	REL8_0_13:1.42
	REL8_1_9:1.42
	REL8_2_4:1.44
	REL8_0_12:1.42
	REL8_1_8:1.42
	REL8_2_3:1.44
	REL7_3_18:1.38.2.1
	REL7_4_16:1.41
	REL8_0_11:1.42
	REL8_1_7:1.42
	REL8_2_2:1.44
	REL8_0_10:1.42
	REL8_1_6:1.42
	REL8_2_1:1.44
	REL7_4_15:1.41
	REL7_3_17:1.38.2.1
	REL8_2_STABLE:1.44.0.2
	REL8_2_0:1.44
	REL8_2_RC1:1.44
	REL8_2_BETA3:1.44
	REL8_2_BETA2:1.44
	REL8_1_5:1.42
	REL8_0_9:1.42
	REL7_4_14:1.41
	REL7_3_16:1.38.2.1
	REL8_2_BETA1:1.44
	REL7_3_15:1.38.2.1
	REL7_4_13:1.41
	REL8_0_8:1.42
	REL8_1_4:1.42
	REL7_3_14:1.38.2.1
	REL7_4_12:1.41
	REL8_0_7:1.42
	REL8_1_3:1.42
	REL7_3_13:1.38.2.1
	REL7_4_11:1.41
	REL8_0_6:1.42
	REL8_1_2:1.42
	REL7_3_12:1.38.2.1
	REL7_4_10:1.41
	REL8_0_5:1.42
	REL8_1_1:1.42
	REL8_1_STABLE:1.42.0.6
	REL8_1_0:1.42
	REL8_1_0RC1:1.42
	REL8_1_0BETA4:1.42
	REL8_1_0BETA3:1.42
	REL7_3_11:1.38.2.1
	REL7_4_9:1.41
	REL8_0_4:1.42
	REL8_1_0BETA2:1.42
	REL8_1_0BETA1:1.42
	REL7_2_8:1.35
	REL7_3_10:1.38.2.1
	REL7_4_8:1.41
	REL8_0_3:1.42
	REL8_0_2:1.42
	REL7_2_7:1.35
	REL7_3_9:1.38.2.1
	REL7_4_7:1.41
	REL8_0_1:1.42
	REL8_0_STABLE:1.42.0.4
	REL8_0_0:1.42.0.2
	REL8_0_0RC5:1.42
	REL8_0_0RC4:1.42
	REL8_0_0RC3:1.42
	REL8_0_0RC2:1.42
	REL8_0_0RC1:1.42
	REL8_0_0BETA5:1.42
	REL8_0_0BETA4:1.42
	REL7_4_6:1.41
	REL7_3_8:1.38.2.1
	REL7_2_6:1.35
	REL8_0_0BETA3:1.42
	REL8_0_0BETA2:1.42
	REL7_2_5:1.35
	REL7_4_5:1.41
	REL7_3_7:1.38.2.1
	REL7_4_4:1.41
	REL8_0_0BETA1:1.42
	REL7_4_3:1.41
	REL7_4_2:1.41
	REL7_3_6:1.38.2.1
	REL7_4_1:1.41
	REL7_3_5:1.38.2.1
	REL7_4:1.41
	REL7_4_RC2:1.41
	REL7_4_STABLE:1.41.0.4
	REL7_4_RC1:1.41
	REL7_4_BETA5:1.41
	REL7_4_BETA4:1.41
	REL7_4_BETA3:1.41
	REL7_4_BETA2:1.41
	WIN32_DEV:1.41.0.2
	REL7_4_BETA1:1.41
	REL7_3_4:1.38.2.1
	REL7_3_2:1.38.2.1
	REL7_2_4:1.35
	REL7_3_STABLE:1.38.0.2
	REL7_2_3:1.35
	REL7_2_STABLE:1.35.0.2
	REL7_2:1.35
	REL7_2_RC2:1.35
	REL7_2_RC1:1.35
	REL7_2_BETA5:1.35
	REL7_2_BETA4:1.35
	REL7_2_BETA3:1.35
	REL7_2_BETA2:1.34
	REL7_2_BETA1:1.34
	REL7_1_2:1.33
	REL7_1_STABLE:1.33.0.2
	REL7_1_BETA:1.31
	REL7_1_BETA3:1.31
	REL7_1_BETA2:1.31
	REL7_1:1.32
	REL7_0_PATCHES:1.24.0.2
	REL7_0:1.24
	REL6_5_PATCHES:1.20.0.2
	REL6_5:1.20
	REL6_4:1.19.0.2
	release-6-3:1.14
	REL2_0B:1.4.0.2
	REL2_0:1.4;
locks; strict;
comment	@# @;


1.53
date	2010.01.05.03.56.52;	author tgl;	state Exp;
branches;
next	1.52;

1.52
date	2009.10.31.01.41.31;	author tgl;	state Exp;
branches;
next	1.51;

1.51
date	2009.08.28.20.26.19;	author petere;	state Exp;
branches;
next	1.50;

1.50
date	2009.08.26.22.15.59;	author petere;	state Exp;
branches;
next	1.49;

1.49
date	2009.03.07.00.13.57;	author alvherre;	state Exp;
branches;
next	1.48;

1.48
date	2008.10.04.21.56.54;	author tgl;	state Exp;
branches;
next	1.47;

1.47
date	2008.08.29.13.02.32;	author petere;	state Exp;
branches;
next	1.46;

1.46
date	2008.02.19.10.30.07;	author petere;	state Exp;
branches;
next	1.45;

1.45
date	2007.06.23.22.12.51;	author tgl;	state Exp;
branches;
next	1.44;

1.44
date	2006.05.27.17.38.45;	author tgl;	state Exp;
branches;
next	1.43;

1.43
date	2006.03.07.01.00.17;	author tgl;	state Exp;
branches;
next	1.42;

1.42
date	2003.11.29.19.51.51;	author pgsql;	state Exp;
branches;
next	1.41;

1.41
date	2003.05.29.20.40.36;	author tgl;	state Exp;
branches;
next	1.40;

1.40
date	2003.02.10.04.44.45;	author tgl;	state Exp;
branches;
next	1.39;

1.39
date	2003.01.31.20.58.00;	author tgl;	state Exp;
branches;
next	1.38;

1.38
date	2002.11.01.22.52.33;	author tgl;	state Exp;
branches
	1.38.2.1;
next	1.37;

1.37
date	2002.04.20.21.56.14;	author petere;	state Exp;
branches;
next	1.36;

1.36
date	2002.03.08.07.12.11;	author tgl;	state Exp;
branches;
next	1.35;

1.35
date	2001.11.16.16.32.33;	author petere;	state Exp;
branches;
next	1.34;

1.34
date	2001.08.09.18.13.23;	author petere;	state Exp;
branches;
next	1.33;

1.33
date	2001.05.04.22.01.03;	author tgl;	state Exp;
branches;
next	1.32;

1.32
date	2001.02.10.22.31.42;	author petere;	state Exp;
branches;
next	1.31;

1.31
date	2000.10.20.21.03.44;	author petere;	state Exp;
branches;
next	1.30;

1.30
date	2000.09.12.21.07.00;	author tgl;	state Exp;
branches;
next	1.29;

1.29
date	2000.08.28.11.53.19;	author petere;	state Exp;
branches;
next	1.28;

1.28
date	2000.07.19.16.29.50;	author petere;	state Exp;
branches;
next	1.27;

1.27
date	2000.07.14.15.32.04;	author thomas;	state Exp;
branches;
next	1.26;

1.26
date	2000.06.07.16.26.41;	author petere;	state Exp;
branches;
next	1.25;

1.25
date	2000.05.29.05.44.53;	author tgl;	state Exp;
branches;
next	1.24;

1.24
date	2000.01.19.02.58.53;	author petere;	state Exp;
branches;
next	1.23;

1.23
date	99.12.13.22.33.03;	author momjian;	state Exp;
branches;
next	1.22;

1.22
date	99.12.09.19.14.50;	author momjian;	state Exp;
branches;
next	1.21;

1.21
date	99.10.18.02.42.31;	author tgl;	state Exp;
branches;
next	1.20;

1.20
date	99.05.03.19.09.40;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	98.07.26.04.30.30;	author scrappy;	state Exp;
branches;
next	1.18;

1.18
date	98.07.24.03.31.21;	author scrappy;	state Exp;
branches;
next	1.17;

1.17
date	98.05.13.04.54.16;	author thomas;	state Exp;
branches;
next	1.16;

1.16
date	98.05.09.23.24.27;	author thomas;	state Exp;
branches;
next	1.15;

1.15
date	98.04.06.00.24.02;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	98.02.18.07.37.05;	author thomas;	state Exp;
branches;
next	1.13;

1.13
date	97.12.20.00.24.55;	author scrappy;	state Exp;
branches;
next	1.12;

1.12
date	97.11.25.22.00.21;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	97.11.24.05.20.57;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	97.11.20.23.22.05;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	97.11.14.15.48.19;	author thomas;	state Exp;
branches;
next	1.8;

1.8
date	97.04.18.08.57.39;	author vadim;	state Exp;
branches;
next	1.7;

1.7
date	97.04.15.17.24.26;	author scrappy;	state Exp;
branches;
next	1.6;

1.6
date	97.04.04.10.40.11;	author scrappy;	state Exp;
branches;
next	1.5;

1.5
date	97.04.02.18.12.14;	author scrappy;	state Exp;
branches;
next	1.4;

1.4
date	96.11.14.07.33.30;	author bryanh;	state Exp;
branches;
next	1.3;

1.3
date	96.11.09.06.18.34;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	96.11.08.05.57.18;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	96.10.27.09.49.05;	author bryanh;	state Exp;
branches;
next	;

1.38.2.1
date	2003.01.31.20.58.28;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.53
log
@Fix a few places where we needed -I. in CPPFLAGS to work properly in
VPATH builds.  We had this already in several places, but not all.
@
text
@#-------------------------------------------------------------------------
#
# Makefile for parser
#
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.52 2009/10/31 01:41:31 tgl Exp $
#
#-------------------------------------------------------------------------

subdir = src/backend/parser
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)

OBJS= analyze.o gram.o keywords.o kwlookup.o parser.o \
      parse_agg.o parse_clause.o parse_coerce.o parse_cte.o parse_expr.o \
      parse_func.o parse_node.o parse_oper.o parse_param.o parse_relation.o \
      parse_target.o parse_type.o parse_utilcmd.o scansup.o

FLEXFLAGS = -CF

include $(top_srcdir)/src/backend/common.mk


# scan is compiled as part of gram
gram.o: scan.c

# Latest flex causes warnings in this file.
ifeq ($(GCC),yes)
gram.o: CFLAGS += -Wno-error
endif


# There is no correct way to write a rule that generates two files.
# Rules with two targets don't have that meaning, they are merely
# shorthand for two otherwise separate rules.  To be safe for parallel
# make, we must chain the dependencies like this.  The semicolon is
# important, otherwise make will choose the built-in rule for
# gram.y=>gram.c.

gram.h: gram.c ;

gram.c: gram.y
ifdef BISON
	$(BISON) -d $(BISONFLAGS) -o $@@ $<
else
	@@$(missing) bison $< $@@
endif


scan.c: scan.l
ifdef FLEX
	$(FLEX) $(FLEXFLAGS) -o'$@@' $<
else
	@@$(missing) flex $< $@@
endif


# Force these dependencies to be known even without dependency info built:
gram.o keywords.o parser.o: gram.h


# gram.c, gram.h, and scan.c are in the distribution tarball, so they
# are not cleaned here.
@


1.52
log
@Implement parser hooks for processing ColumnRef and ParamRef nodes, as per my
recent proposal.  As proof of concept, remove knowledge of Params from the
core parser, arranging for them to be handled entirely by parser hook
functions.  It turns out we need an additional hook for that --- I had
forgotten about the code that handles inferring a parameter's type from
context.

This is a preliminary step towards letting plpgsql handle its variables
through parser hooks.  Additional work remains to be done to expose the
facility through SPI, but I think this is all the changes needed in the core
parser.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.51 2009/08/28 20:26:19 petere Exp $
d13 1
a13 1
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
@


1.51
log
@Derived files that are shipped in the distribution used to be built in the
source directory even for out-of-tree builds.  They are now alsl built in
the build tree.  This should be more convenient for certain developers'
workflows, and shouldn't really break anything else.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.50 2009/08/26 22:15:59 petere Exp $
d15 4
a18 3
OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_cte.o parse_clause.o \
      parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
      parse_type.o parse_coerce.o parse_target.o parse_utilcmd.o scansup.o kwlookup.o
@


1.50
log
@Add -Wno-error to CFLAGS from gram.o as long as it's broken.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.49 2009/03/07 00:13:57 alvherre Exp $
d25 1
a25 1
gram.o: $(srcdir)/scan.c
d40 1
a40 1
$(srcdir)/gram.h: $(srcdir)/gram.c ;
d42 1
a42 1
$(srcdir)/gram.c: gram.y
d50 1
a50 1
$(srcdir)/scan.c: scan.l
d59 1
a59 1
gram.o keywords.o parser.o: $(srcdir)/gram.h
@


1.49
log
@Separate the key word list that lived in keywords.c into a new header file
kwlist.h, to avoid having to link the backend object file into other programs
like pg_dump.  We can now simply symlink a single source file from the backend
(kwlookup.c, containing the shared routine ScanKeywordLookup) and compile it
locally, which is a lot cleaner.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.48 2008/10/04 21:56:54 tgl Exp $
d27 5
@


1.48
log
@Implement SQL-standard WITH clauses, including WITH RECURSIVE.

There are some unimplemented aspects: recursive queries must use UNION ALL
(should allow UNION too), and we don't have SEARCH or CYCLE clauses.
These might or might not get done for 8.4, but even without them it's a
pretty useful feature.

There are also a couple of small loose ends and definitional quibbles,
which I'll send a memo about to pgsql-hackers shortly.  But let's land
the patch now so we can get on with other development.

Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.47 2008/08/29 13:02:32 petere Exp $
d17 1
a17 1
      parse_type.o parse_coerce.o parse_target.o parse_utilcmd.o scansup.o
@


1.47
log
@Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.46 2008/02/19 10:30:07 petere Exp $
d15 1
a15 1
OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \
@


1.46
log
@Refactor backend makefiles to remove lots of duplicate code
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.45 2007/06/23 22:12:51 tgl Exp $
d35 1
a35 1
$(srcdir)/gram.c: $(srcdir)/parse.h ;
d37 3
a39 5
$(srcdir)/parse.h: gram.y
ifdef YACC
	$(YACC) -d $(YFLAGS) $<
	mv -f y.tab.c $(srcdir)/gram.c
	mv -f y.tab.h $(srcdir)/parse.h
d54 1
a54 1
gram.o keywords.o parser.o: $(srcdir)/parse.h
d57 1
a57 1
# gram.c, parse.h, and scan.c are in the distribution tarball, so they
a58 3
clean: 
# And the garbage that might have been left behind by partial build:
	@@rm -f y.tab.h y.tab.c y.output lex.yy.c
@


1.45
log
@Separate parse-analysis for utility commands out of parser/analyze.c
(which now deals only in optimizable statements), and put that code
into a new file parser/parse_utilcmd.c.  This helps clarify and enforce
the design rule that utility statements shouldn't be processed during
the regular parse analysis phase; all interpretation of their meaning
should happen after they are given to ProcessUtility to execute.
(We need this because we don't retain any locks for a utility statement
that's in a plan cache, nor have any way to detect that it's stale.)

We are also able to simplify the API for parse_analyze() and related
routines, because they will now always return exactly one Query structure.

In passing, fix bug #3403 concerning trying to add a serial column to
an existing temp table (this is largely Heikki's work, but we needed
all that restructuring to make it safe).
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.44 2006/05/27 17:38:45 tgl Exp $
d21 1
a21 5

all: SUBSYS.o

SUBSYS.o: $(OBJS)
	$(LD) $(LDREL) $(LDOUT) $@@ $^
a61 1
	rm -f SUBSYS.o $(OBJS)
@


1.44
log
@Re-introduce the yylex filter function formerly used to support UNION
JOIN, which I removed in a recent fit of over-optimism that we wouldn't
have any future use for it.  Now it's needed to support disambiguating
WITH CHECK OPTION from WITH TIME ZONE.  As proof of concept, add stub
grammar productions for WITH CHECK OPTION.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.43 2006/03/07 01:00:17 tgl Exp $
d17 1
a17 1
      parse_type.o parse_coerce.o parse_target.o scansup.o
@


1.43
log
@Remove the stub support we had for UNION JOIN; per discussion, this is
not likely ever to be implemented seeing it's been removed from SQL2003.
This allows getting rid of the 'filter' version of yylex() that we had in
parser.c, which should save at least a few microseconds in parsing.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.42 2003/11/29 19:51:51 pgsql Exp $
d60 1
a60 1
gram.o keywords.o: $(srcdir)/parse.h
@


1.42
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d5 1
a5 1
# $PostgreSQL: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.41 2003/05/29 20:40:36 tgl Exp $
d60 1
a60 2

gram.o keywords.o parser.o: $(srcdir)/parse.h
d68 1
a68 1
	@@rm -f y.tab.c y.tab.h lex.yy.c
@


1.41
log
@Adopt latest bison's spelling of 'syntax error' rather than 'parse error'
for grammar-detected problems.  Revert Makefile hack that kept it looking
like the pre-bison-1.875 output.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.40 2003/02/10 04:44:45 tgl Exp $
@


1.40
log
@Get rid of last few vestiges of parsetree dependency on grammar token
codes, per discussion from last March.  parse.h should now be included
*only* by gram.y, scan.l, keywords.c, parser.c.  This prevents surprising
misbehavior after seemingly-trivial grammar adjustments.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.39 2003/01/31 20:58:00 tgl Exp $
a40 5
# The sed hack is so that we can get the same error messages with
# bison 1.875 and later as we did with earlier bisons.  Eventually,
# I suppose, we should re-standardize on "syntax error" --- in which
# case flip the sed translation, but don't remove it.

d44 1
a44 1
	sed -e 's/"syntax error/"parse error/' < y.tab.c > $(srcdir)/gram.c
a45 1
	rm -f y.tab.c
@


1.39
log
@Tweak bison build rules so that we get the same error messages from
bison 1.875 and later as we did from earlier bison releases.  Eventually
we will probably want to adopt the newer message spelling ... but not yet.
Per recent discussion on pgpatches.
Note: I didn't change the build rules for bootstrap, ecpg, or plpgsql
grammars, since these do not affect regression test results.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.38 2002/11/01 22:52:33 tgl Exp $
d67 1
a67 1
keywords.o parse_clause.o parse_expr.o parser.o gram.o: $(srcdir)/parse.h
@


1.38
log
@Arrange to compile flex output files as inclusions into other files
(usually bison output files), not as standalone files.  This hack
works around flex's insistence on including <stdio.h> before we are
able to include postgres.h; postgres.h will already be read before
the compiler starts to read the flex output file.  Needed for largefile
support on some platforms.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.37 2002/04/20 21:56:14 petere Exp $
d41 5
d49 1
a49 1
	mv -f y.tab.c $(srcdir)/gram.c
d51 1
@


1.38.2.1
log
@Tweak bison build rules so that we get the same error messages from
bison 1.875 and later as we did from earlier bison releases.  Eventually
we will probably want to adopt the newer message spelling ... but not yet.
Per recent discussion on pgpatches.
Note: I didn't change the build rules for bootstrap, ecpg, or plpgsql
grammars, since these do not affect regression test results.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql-server/src/backend/parser/Makefile,v 1.38 2002/11/01 22:52:33 tgl Exp $
a40 5
# The sed hack is so that we can get the same error messages with
# bison 1.875 and later as we did with earlier bisons.  Eventually,
# I suppose, we should re-standardize on "syntax error" --- in which
# case flip the sed translation, but don't remove it.

d44 1
a44 1
	sed -e 's/"syntax error/"parse error/' < y.tab.c > $(srcdir)/gram.c
a45 1
	rm -f y.tab.c
@


1.37
log
@Scanner performance improvements

Use flex flags -CF.  Pass the to-be-scanned string around as StringInfo
type, to avoid querying the length repeatedly.  Clean up some code and
remove lex-compatibility cruft.  Escape backslash sequences inline.  Use
flex-provided yy_scan_buffer() function to set up input, rather than using
myinput().
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.36 2002/03/08 07:12:11 tgl Exp $
d13 2
d17 1
a17 1
      parse_type.o parse_coerce.o parse_target.o scan.o scansup.o
d28 4
d61 1
a61 1
keywords.o parse_clause.o parse_expr.o parser.o scan.o: $(srcdir)/parse.h
@


1.36
log
@analyze.o need not depend on parser.h.
@
text
@d5 1
a5 1
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.35 2001/11/16 16:32:33 petere Exp $
d17 2
d47 1
a47 1
	$(FLEX) $(FLEXFLAGS) -Pbase_yy -o'$@@' $<
a63 10


# This is unusual:  We actually have to build some of the parts before
# we know what the header file dependencies are.  
dep depend: gram.c scan.c
	$(CC) -MM $(CFLAGS) *.c >depend

ifeq (depend,$(wildcard depend))
include depend
endif
@


1.35
log
@Make the yacc rules safe for parallel make.  See discussion on pgsql-patches
and comment in src/backend/parser/Makefile for the technical details.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.34 2001/08/09 18:13:23 petere Exp $
d53 1
a53 1
analyze.o keywords.o parse_clause.o parse_expr.o parser.o scan.o: $(srcdir)/parse.h
@


1.34
log
@No longer a need for -Wno-error
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.33 2001/05/04 22:01:03 tgl Exp $
d23 11
a33 1
$(srcdir)/gram.c $(srcdir)/parse.h: gram.y
d36 2
a37 2
	mv y.tab.c $(srcdir)/gram.c
	mv y.tab.h $(srcdir)/parse.h
d41 1
@


1.33
log
@Makefile should have automatic dependency for parser.o too, if it's
going to have any at all.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.32 2001/02/10 22:31:42 petere Exp $
a11 4

ifeq ($(GCC), yes)
override CFLAGS+= -Wno-error
endif
@


1.32
log
@Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages
to users.  (Same way flex has been handled for a while.)
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.31 2000/10/20 21:03:44 petere Exp $
d44 3
a46 1
analyze.o keywords.o parse_clause.o parse_expr.o scan.o: $(srcdir)/parse.h
@


1.31
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.30 2000/09/12 21:07:00 tgl Exp $
d28 1
d32 3
@


1.30
log
@First cut at full support for OUTER JOINs.  There are still a few loose
ends to clean up (see my message of same date to pghackers), but mostly
it works.  INITDB REQUIRED!
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.29 2000/08/28 11:53:19 petere Exp $
d14 1
a14 1
CFLAGS+= -Wno-error
@


1.29
log
@New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.28 2000/07/19 16:29:50 petere Exp $
d34 1
a34 1
	$(FLEX) $(FLEXFLAGS) -o'$@@' $<
@


1.28
log
@Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
@
text
@d5 1
a5 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.27 2000/07/14 15:32:04 thomas Exp $
d33 5
a37 2
	$(LEX) $(LFLAGS) $<
	mv lex.yy.c $@@
@


1.27
log
@Include rule to build include/parser/parse.h since nothing else can
 build in this directory otherwise :(
@
text
@d3 1
a3 2
# Makefile--
#    Makefile for parser
d5 1
a5 2
# IDENTIFICATION
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.26 2000/06/07 16:26:41 petere Exp $
d9 3
a11 2
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
d13 1
a13 1
ifeq ($(CC), gcc)
d21 2
a22 1
all: $(SRCDIR)/include/parser/parse.h SUBSYS.o
d25 1
a25 4
	$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)

$(SRCDIR)/include/parser/parse.h: parse.h
	cp $< $@@
d27 1
a27 1
gram.c parse.h: gram.y
d29 2
a30 2
	mv y.tab.c gram.c
	mv y.tab.h parse.h
d32 1
a32 1
scan.c:	scan.l
d34 2
a35 1
	mv lex.yy.c scan.c
d37 9
a45 4
# The following dependencies on parse.h are computed by
# make depend, but we state them here explicitly anyway because 
# parse.h doesn't even exist at first and if user fails to 
# do make depend, we still want the build to succeed.
a46 1
analyze.o keywords.o scan.o: parse.h
a52 10
# Remove scan.c from the clean since we want to avoid rebuilding when using
# the original source distribution. This should help Solaris machines whose
# lex has trouble with exclusive states.
# Remove gram.c, parse.h from the clean since we have now started to exceed
# internal limits for some non-bison yaccs. - thomas 1998-02-17
clean: 
	rm -f SUBSYS.o $(OBJS) # gram.c parse.h # scan.c
# And the garbage that might have been left behind by partial build:
	rm -f y.tab.c y.tab.h lex.yy.c

a55 1

@


1.26
log
@Gen_fmgrtab.sh is strange: it is a platform dependent way (because it uses
CPP) to create platform independent files. Unfortunately, that means that
every config.status (or configure) run invariably causes a relink of the
postmaster and also that we can't put these files in the distribution
(usefully). So we make it a little smarter: when the output files already
exist and it notices that it would recreate them in identical form, it
doesn't touch them. In order to avoid re-running the make rule all the time
we update a timestamp file instead.

Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that
is detected at configure time, not necessarily named `awk' and have it check
for exit statuses a little better.

In other news... Remove USE_LOCALE from the templates, it was set to `no'
everywhere anyway. Also remove YACC and YFLAGS from the templates, configure
is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that
instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules
that need this flag should explicitly invoke it. YFLAGS should be a user
variable. Update the makefiles to that effect.
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.25 2000/05/29 05:44:53 tgl Exp $
d12 1
a12 1
include ../../Makefile.global
d22 1
a22 1
all: SUBSYS.o
d26 3
@


1.25
log
@Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/Makefile,v 1.24 2000/01/19 02:58:53 petere Exp $
d28 1
a28 1
	$(YACC) $(YFLAGS) $<
d33 1
a33 1
	$(LEX) $<
@


1.24
log
@Removed MBFLAGS from makefiles since it's now done in include/config.h.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.23 1999/12/13 22:33:03 momjian Exp $
a12 2

CFLAGS += -I..
@


1.23
log
@New LDOUT makefile variable for QNX os.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.22 1999/12/09 19:14:50 momjian Exp $
a17 4
endif

ifdef MULTIBYTE
CFLAGS+= $(MBFLAGS)
@


1.22
log
@Make LD -r as macros that can be changed for QNX.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.21 1999/10/18 02:42:31 tgl Exp $
d31 1
a31 1
	$(LD) $(LDREL) -o SUBSYS.o $(OBJS)
@


1.21
log
@Remove fixed-size literal buffer from scan.l, and repair
boundary-condition bug in myinput() which caused flex scanner to fail
on tokens larger than a bufferload.  Turns out flex doesn't want null-
terminated input ... and if it gives you a 1-character buffer, you'd
better supply a character, not a null, lest you be thought to be
reporting end of input.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.20 1999/05/03 19:09:40 momjian Exp $
d31 1
a31 1
	$(LD) -r -o SUBSYS.o $(OBJS)
@


1.20
log
@here are some patches for 6.5.0 which I already submitted but have never
been applied. The patches are in the .tar.gz attachment at the end:

varchar-array.patch     this patch adds support for arrays of bpchar() and
                        varchar(), which where always missing from postgres.

                        These datatypes can be used to replace the _char4,
                        _char8, etc., which were dropped some time ago.

block-size.patch        this patch fixes many errors in the parser and other
                        program which happen with very large query statements
                        (> 8K) when using a page size larger than 8192.

                        This patch is needed if you want to submit queries
                        larger than 8K. Postgres supports tuples up to 32K
                        but you can't insert them because you can't submit
                        queries larger than 8K. My patch fixes this problem.

                        The patch also replaces all the occurrences of `8192'
                        and `1<<13' in the sources with the proper constants
                        defined in include files. You should now never find
                        8192 hardwired in C code, just to make code clearer.


--
Massimo Dal Zotto
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.19 1998/07/26 04:30:30 scrappy Exp $
d40 1
a40 3
	sed -e 's/#define YY_BUF_SIZE .*/#define YY_BUF_SIZE 65536/' \
		<lex.yy.c >scan.c
	rm -f lex.yy.c
@


1.19
log
@
From: t-ishii@@sra.co.jp

As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.18 1998/07/24 03:31:21 scrappy Exp $
d40 3
a42 1
	mv lex.yy.c scan.c
@


1.18
log
@
I really hope that I haven't missed anything in this one...

From: t-ishii@@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.17 1998/05/13 04:54:16 thomas Exp $
d20 2
a21 2
ifdef MB
CFLAGS+= -DMB=$(MB)
@


1.17
log
@Remove extraneous -DPARSEDEBUG from CFLAGS options.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.16 1998/05/09 23:24:27 thomas Exp $
d20 3
@


1.16
log
@Add parse_coerce.c for type conversion handling.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.15 1998/04/06 00:24:02 momjian Exp $
d14 1
a14 1
CFLAGS += -I.. -DPARSEDEBUG
@


1.15
log
@Hi,

Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.14 1998/02/18 07:37:05 thomas Exp $
d14 1
a14 1
CFLAGS += -I..
d23 1
a23 1
      parse_type.o parse_target.o scan.o scansup.o
@


1.14
log
@Start shipping gram.y products gram.c and parse.h to avoid having to build
 them from scratch. gram.y has now grown so that some non-bison yaccs
 (including FreeBSDs) run out of room and quit.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.13 1997/12/20 00:24:55 scrappy Exp $
d14 1
a14 3
INCLUDE_OPT= -I.. 

CFLAGS+= $(INCLUDE_OPT)
d48 2
a49 2
dep: gram.c scan.c
	$(CC) -MM $(INCLUDE_OPT) *.c >depend
@


1.13
log
@Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.12 1997/11/25 22:00:21 momjian Exp $
d56 2
d59 1
a59 1
	rm -f SUBSYS.o $(OBJS) gram.c parse.h # scan.c
@


1.12
log
@Break parser functions into smaller files, group together.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.11 1997/11/24 05:20:57 momjian Exp $
d14 1
a14 3
INCLUDE_OPT= -I.. \
             -I../port/$(PORTNAME) \
             -I../../include
@


1.11
log
@Move dbcommands.c to commands/.  It should not be in the parser directory.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.10 1997/11/20 23:22:05 momjian Exp $
d25 3
a27 2
OBJS= analyze.o catalog_utils.o gram.o \
      keywords.o parser.o parse_query.o scan.o scansup.o
@


1.10
log
@Remove all time travel stuff.  Small parser cleanup.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.9 1997/11/14 15:48:19 thomas Exp $
d25 1
a25 1
OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \
@


1.9
log
@Supress cleaning scan.c since we will try to include it in the distribution.
This should help Solaris and (presumably) other distributions with
 old AT&T-descended lex programs which can't handle "exclusive states".
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/parser/Makefile,v 1.8 1997/04/18 08:57:39 vadim Exp $
d26 1
a26 1
      keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
@


1.8
log
@Fix for -Wno-error
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.7 1997/04/15 17:24:26 scrappy Exp $
d54 3
d58 1
a58 1
	rm -f SUBSYS.o $(OBJS) gram.c parse.h scan.c
@


1.7
log
@Fix up the -Wno-error problem for non-gcc compilers

Pointed out by many many ppl
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.6 1997/04/04 10:40:11 scrappy Exp $
d20 1
a20 1
ifeq ($CC), gcc)
@


1.6
log
@This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.5 1997/04/02 18:12:14 scrappy Exp $
d18 6
a23 1
CFLAGS+= $(INCLUDE_OPT) -Wno-error
@


1.5
log
@From: Oleg Bartunov <oleg@@sai.msu.su>
Subject: [HACKERS] locale patches !

Hi there,

here are little patches to get Postgres 6.1 works with locale stuff.
This is a patch against 970402.tar.gz, there are no problem to apply them
by hand to 6.0 release. Collate stuff tested about 1-2 months in real
working database but I'm sure there must be no problem. US hackers
could vote against locale implementation ( locale for sure will affect to
speed of postgres ), so I introduce variable USE_LOCALE which
controls locale stuff. Non-US users now could use ~* operator
for searching and <order by> for strings with nation alphabet.
Please, don't forget, as I did first time, to set environment variable
LC_CTYPE and LC_COLLATE because backend get locale information from them.
I start postmaster from a little script, assuming that shell is Bash shell
it looks like:

#!/bin/sh

export LC_CTYPE=koi8-r
export LC_COLLATE=koi8-r
postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.4 1996/11/14 07:33:30 bryanh Exp $
d18 1
a18 1
CFLAGS+= $(INCLUDE_OPT)
@


1.4
log
@Use -Wno-error option only if compiler is gcc.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.3 1996/11/09 06:18:34 momjian Exp $
a18 7

ifeq ($(CC), gcc)
# Until we figure out how to get rid of the warnings in this directory,
# we must turn off any -Werror that is in CFLAGS now.  These options only
# exist for the gcc compiler.
CFLAGS+= -Wno-error
endif
@


1.3
log
@Makefile cleanup after reorganization
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.2 1996/11/08 05:57:18 momjian Exp $
d11 1
a11 1
SRCDIR = ../..
d14 3
a16 3
INCLUDE_OPT = -I.. \
              -I../port/$(PORTNAME) \
              -I../../include
d18 1
a18 1
CFLAGS+=$(INCLUDE_OPT) -Wno-error
d20 9
a28 2
OBJS = analyze.o catalog_utils.o dbcommands.o gram.o \
       keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
@


1.2
log
@Compile and warning cleanup
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/parser/Makefile,v 1.1 1996/10/27 09:49:05 bryanh Exp $
a15 1
              -I../include \
@


1.1
log
@Simplify make files, add full dependencies.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/access/common/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:09 scrappy Exp $
d19 1
a19 1
CFLAGS+=$(INCLUDE_OPT)
@
