head	1.19;
access;
symbols
	REL9_0_0:1.19
	REL9_1_ALPHA1:1.19
	REL9_0_RC1:1.19
	REL9_0_BETA4:1.19
	REL9_0_STABLE:1.19.0.14
	REL9_0_BETA3:1.19
	REL9_0_BETA2:1.19
	REL7_4_29:1.14
	REL8_0_25:1.15
	REL8_1_21:1.16
	REL8_2_17:1.16
	REL8_3_11:1.17
	REL8_4_4:1.19
	REL9_0_BETA1:1.19
	REL9_0_ALPHA5_BRANCH:1.19.0.12
	REL9_0_ALPHA5:1.19
	REL7_4_28:1.14
	REL8_0_24:1.15
	REL8_1_20:1.16
	REL8_2_16:1.16
	REL8_3_10:1.17
	REL8_4_3:1.19
	REL9_0_ALPHA4:1.19
	REL9_0_ALPHA4_BRANCH:1.19.0.10
	REL8_5_ALPHA3:1.19
	REL8_5_ALPHA3_BRANCH:1.19.0.8
	REL7_4_27:1.14
	REL8_0_23:1.15
	REL8_1_19:1.16
	REL8_2_15:1.16
	REL8_3_9:1.17
	REL8_4_2:1.19
	REL8_5_ALPHA2:1.19
	REL8_5_ALPHA2_BRANCH:1.19.0.6
	REL7_4_26:1.14
	REL8_0_22:1.15
	REL8_1_18:1.16
	REL8_2_14:1.16
	REL8_3_8:1.17
	REL8_4_1:1.19
	REL8_5_ALPHA1:1.19
	REL8_5_ALPHA1_BRANCH:1.19.0.4
	REL8_4_STABLE:1.19.0.2
	REL8_4_0:1.19
	REL8_4_RC2:1.19
	REL8_4_RC1:1.19
	REL8_4_BETA2:1.19
	REL8_4_BETA1:1.19
	REL7_4_25:1.14
	REL8_0_21:1.15
	REL8_1_17:1.16
	REL8_2_13:1.16
	REL8_3_7:1.17
	REL7_4_24:1.14
	REL8_0_20:1.15
	REL8_1_16:1.16
	REL8_2_12:1.16
	REL8_3_6:1.17
	REL7_4_23:1.14
	REL8_0_19:1.15
	REL8_1_15:1.16
	REL8_2_11:1.16
	REL8_3_5:1.17
	REL7_4_22:1.14
	REL8_0_18:1.15
	REL8_1_14:1.16
	REL8_2_10:1.16
	REL8_3_4:1.17
	REL7_4_21:1.14
	REL8_0_17:1.15
	REL8_1_13:1.16
	REL8_2_9:1.16
	REL8_3_3:1.17
	REL7_4_20:1.14
	REL8_0_16:1.15
	REL8_1_12:1.16
	REL8_2_8:1.16
	REL8_3_2:1.17
	REL8_2_7:1.16
	REL8_3_1:1.17
	REL8_3_STABLE:1.17.0.2
	REL8_3_0:1.17
	REL8_3_RC2:1.17
	REL7_3_21:1.14
	REL7_4_19:1.14
	REL8_0_15:1.15
	REL8_1_11:1.16
	REL8_2_6:1.16
	REL8_3_RC1:1.17
	REL8_3_BETA4:1.17
	REL8_3_BETA3:1.17
	REL8_3_BETA2:1.17
	REL8_3_BETA1:1.17
	REL7_3_20:1.14
	REL7_4_18:1.14
	REL8_0_14:1.15
	REL8_1_10:1.16
	REL8_2_5:1.16
	REL7_3_19:1.14
	REL7_4_17:1.14
	REL8_0_13:1.15
	REL8_1_9:1.16
	REL8_2_4:1.16
	REL8_0_12:1.15
	REL8_1_8:1.16
	REL8_2_3:1.16
	REL7_3_18:1.14
	REL7_4_16:1.14
	REL8_0_11:1.15
	REL8_1_7:1.16
	REL8_2_2:1.16
	REL8_0_10:1.15
	REL8_1_6:1.16
	REL8_2_1:1.16
	REL7_4_15:1.14
	REL7_3_17:1.14
	REL8_2_STABLE:1.16.0.4
	REL8_2_0:1.16
	REL8_2_RC1:1.16
	REL8_2_BETA3:1.16
	REL8_2_BETA2:1.16
	REL8_1_5:1.16
	REL8_0_9:1.15
	REL7_4_14:1.14
	REL7_3_16:1.14
	REL8_2_BETA1:1.16
	REL7_3_15:1.14
	REL7_4_13:1.14
	REL8_0_8:1.15
	REL8_1_4:1.16
	REL7_3_14:1.14
	REL7_4_12:1.14
	REL8_0_7:1.15
	REL8_1_3:1.16
	REL7_3_13:1.14
	REL7_4_11:1.14
	REL8_0_6:1.15
	REL8_1_2:1.16
	REL7_3_12:1.14
	REL7_4_10:1.14
	REL8_0_5:1.15
	REL8_1_1:1.16
	REL8_1_STABLE:1.16.0.2
	REL8_1_0:1.16
	REL8_1_0RC1:1.16
	REL8_1_0BETA4:1.16
	REL8_1_0BETA3:1.16
	REL7_3_11:1.14
	REL7_4_9:1.14
	REL8_0_4:1.15
	REL8_1_0BETA2:1.16
	REL8_1_0BETA1:1.16
	REL7_2_8:1.14
	REL7_3_10:1.14
	REL7_4_8:1.14
	REL8_0_3:1.15
	REL8_0_2:1.15
	REL7_2_7:1.14
	REL7_3_9:1.14
	REL7_4_7:1.14
	REL8_0_1:1.15
	REL8_0_STABLE:1.15.0.4
	REL8_0_0:1.15.0.2
	REL8_0_0RC5:1.15
	REL8_0_0RC4:1.15
	REL8_0_0RC3:1.15
	REL8_0_0RC2:1.15
	REL8_0_0RC1:1.15
	REL8_0_0BETA5:1.15
	REL8_0_0BETA4:1.15
	REL7_4_6:1.14
	REL7_3_8:1.14
	REL7_2_6:1.14
	REL8_0_0BETA3:1.15
	REL8_0_0BETA2:1.15
	REL7_2_5:1.14
	REL7_4_5:1.14
	REL7_3_7:1.14
	REL7_4_4:1.14
	REL8_0_0BETA1:1.15
	REL7_4_3:1.14
	REL7_4_2:1.14
	REL7_3_6:1.14
	REL7_4_1:1.14
	REL7_3_5:1.14
	REL7_4:1.14
	REL7_4_RC2:1.14
	REL7_4_STABLE:1.14.0.10
	REL7_4_RC1:1.14
	REL7_4_BETA5:1.14
	REL7_4_BETA4:1.14
	REL7_4_BETA3:1.14
	REL7_4_BETA2:1.14
	WIN32_DEV:1.14.0.8
	REL7_4_BETA1:1.14
	REL7_3_4:1.14
	REL7_3_2:1.14
	REL7_2_4:1.14
	REL7_3_STABLE:1.14.0.6
	REL7_2_3:1.14
	REL7_2_STABLE:1.14.0.4
	REL7_2:1.14
	REL7_2_RC2:1.14
	REL7_2_RC1:1.14
	REL7_2_BETA5:1.14
	REL7_2_BETA4:1.14
	REL7_2_BETA3:1.14
	REL7_2_BETA2:1.14
	REL7_2_BETA1:1.14
	REL7_1_2:1.14
	REL7_1_STABLE:1.14.0.2
	REL7_1_BETA:1.14
	REL7_1_BETA3:1.14
	REL7_1_BETA2:1.14
	REL7_1:1.14
	REL7_0_PATCHES:1.11.0.2
	REL7_0:1.11
	REL6_5_PATCHES:1.8.0.2
	REL6_5:1.8
	REL6_4:1.7.0.2
	release-6-3:1.5
	REL2_0B:1.3.0.2
	REL2_0:1.3;
locks; strict;
comment	@# @;


1.19
date	2008.10.21.20.42.53;	author tgl;	state Exp;
branches;
next	1.18;

1.18
date	2008.02.19.10.30.07;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2007.01.20.17.16.11;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2005.06.10.22.25.36;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2003.11.29.19.51.51;	author pgsql;	state Exp;
branches;
next	1.14;

1.14
date	2000.09.29.18.21.23;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2000.08.31.16.10.14;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2000.05.29.05.44.53;	author tgl;	state Exp;
branches;
next	1.11;

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

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

1.9
date	99.08.16.02.17.56;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	99.02.05.19.59.28;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	98.07.20.20.01.48;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	98.04.06.00.23.55;	author momjian;	state Exp;
branches;
next	1.5;

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

1.4
date	97.12.19.02.06.17;	author scrappy;	state Exp;
branches;
next	1.3;

1.3
date	96.11.06.09.29.18;	author scrappy;	state Exp;
branches;
next	1.2;

1.2
date	96.10.31.10.59.34;	author scrappy;	state Exp;
branches;
next	1.1;

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


desc
@@


1.19
log
@Add a concept of "placeholder" variables to the planner.  These are variables
that represent some expression that we desire to compute below the top level
of the plan, and then let that value "bubble up" as though it were a plain
Var (ie, a column value).

The immediate application is to allow sub-selects to be flattened even when
they are below an outer join and have non-nullable output expressions.
Formerly we couldn't flatten because such an expression wouldn't properly
go to NULL when evaluated above the outer join.  Now, we wrap it in a
PlaceHolderVar and arrange for the actual evaluation to occur below the outer
join.  When the resulting Var bubbles up through the join, it will be set to
NULL if necessary, yielding the correct results.  This fixes a planner
limitation that's existed since 7.1.

In future we might want to use this mechanism to re-introduce some form of
Hellerstein's "expensive functions" optimization, ie place the evaluation of
an expensive function at the most suitable point in the plan tree.
@
text
@#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for optimizer/util
#
# IDENTIFICATION
#    $PostgreSQL: pgsql/src/backend/optimizer/util/Makefile,v 1.18 2008/02/19 10:30:07 petere Exp $
#
#-------------------------------------------------------------------------

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

OBJS = clauses.o joininfo.o pathnode.o placeholder.o plancat.o predtest.o \
       relnode.o restrictinfo.o tlist.o var.o

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


1.18
log
@Refactor backend makefiles to remove lots of duplicate code
@
text
@d7 1
a7 1
#    $PostgreSQL: pgsql/src/backend/optimizer/util/Makefile,v 1.17 2007/01/20 17:16:11 petere Exp $
d15 1
a15 1
OBJS = clauses.o joininfo.o pathnode.o plancat.o predtest.o \
@


1.17
log
@Remove remains of old depend target.
@
text
@d7 1
a7 1
#    $PostgreSQL: pgsql/src/backend/optimizer/util/Makefile,v 1.16 2005/06/10 22:25:36 tgl Exp $
d18 1
a18 7
all: SUBSYS.o

SUBSYS.o: $(OBJS)
	$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)

clean: 
	rm -f SUBSYS.o $(OBJS)
@


1.16
log
@Separate predicate-testing code out of indxpath.c, making it a module
in its own right.  As proposed by Simon Riggs, but with some editorializing
of my own.
@
text
@d7 1
a7 1
#    $PostgreSQL: pgsql/src/backend/optimizer/util/Makefile,v 1.15 2003/11/29 19:51:51 pgsql Exp $
a22 3
depend dep:
	$(CC) -MM $(CFLAGS) *.c >depend

a24 4

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


1.15
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d7 1
a7 1
#    $PostgreSQL: /cvsroot/pgsql-server/src/backend/optimizer/util/Makefile,v 1.14 2000/09/29 18:21:23 tgl Exp $
d15 2
a16 2
OBJS = restrictinfo.o clauses.o plancat.o \
       joininfo.o pathnode.o relnode.o tlist.o var.o
@


1.14
log
@Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
(Don't forget that an alias is required.)  Views reimplemented as expanding
to subselect-in-FROM.  Grouping, aggregates, DISTINCT in views actually
work now (he says optimistically).  No UNION support in subselects/views
yet, but I have some ideas about that.  Rule-related permissions checking
moved out of rewriter and into executor.
INITDB REQUIRED!
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.13 2000/08/31 16:10:14 petere Exp $
@


1.13
log
@Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
@
text
@d7 1
a7 1
#    $Header: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.12 2000/05/29 05:44:53 tgl Exp $
d15 1
a15 1
OBJS = restrictinfo.o clauses.o indexnode.o plancat.o \
@


1.12
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/optimizer/util/Makefile,v 1.11 1999/12/13 22:32:58 momjian Exp $
d11 3
a13 2
SRCDIR = ../../..
include ../../../Makefile.global
a17 2
# not ready yet: predmig.o xfunc.o

a31 1

@


1.11
log
@New LDOUT makefile variable for QNX os.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.10 1999/12/09 19:14:49 momjian Exp $
a12 2

CFLAGS += -I../..
@


1.10
log
@Make LD -r as macros that can be changed for QNX.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.9 1999/08/16 02:17:56 tgl Exp $
d24 1
a24 1
	$(LD) $(LDREL) -o SUBSYS.o $(OBJS)
@


1.9
log
@Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars).  This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases.  I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.8 1999/02/05 19:59:28 momjian Exp $
d24 1
a24 1
	$(LD) -r -o SUBSYS.o $(OBJS)
@


1.8
log
@Optimizer cleanup.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.7 1998/07/20 20:01:48 momjian Exp $
d17 1
a17 1
       joininfo.o keys.o ordering.o pathnode.o relnode.o tlist.o var.o
@


1.7
log
@Makefile removal of internal.c.
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.6 1998/04/06 00:23:55 momjian Exp $
d16 1
a16 1
OBJS = clauseinfo.o clauses.o indexnode.o plancat.o \
@


1.6
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/optimizer/util/Makefile,v 1.5 1997/12/20 00:24:45 scrappy Exp $
d16 1
a16 1
OBJS = clauseinfo.o clauses.o indexnode.o internal.o plancat.o \
@


1.5
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/optimizer/util/Makefile,v 1.4 1997/12/19 02:06:17 scrappy Exp $
d14 1
a14 3
INCLUDE_OPT = -I../.. 

CFLAGS+=$(INCLUDE_OPT)
d27 1
a27 1
	$(CC) -MM $(INCLUDE_OPT) *.c >depend
@


1.4
log
@More cleanups.  I can now compile without PORTNAME being defined n
Makefile.global.

End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port".  Most, if not everything,
*should* be determined by configure, or by the compiler itself.  Still
work to be done though :)
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.3 1996/11/06 09:29:18 scrappy Exp $
a14 4

ifdef PORTNAME
INCLUDE_OPT+=-I../../port/$(PORTNAME)  
endif
@


1.3
log
@More files cleaned out
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/optimizer/util/Makefile,v 1.2 1996/10/31 10:59:34 scrappy Exp $
d14 5
a18 3
INCLUDE_OPT = -I../.. \
              -I../../port/$(PORTNAME) \
              -I../../../include
@


1.2
log
@Cleanup Makefiles

Add #include "postgres.h"
	and
    #include <sys/types.h>
@
text
@d7 1
a7 1
#    $Header: /usr/local/cvsroot/postgres95/src/backend/optimizer/util/Makefile,v 1.1 1996/10/27 09:48:53 bryanh Exp $
d14 2
a15 1
INCLUDE_OPT = -I../../port/$(PORTNAME) \
@


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 $
d14 1
a14 3
INCLUDE_OPT = -I../.. \
              -I../../port/$(PORTNAME) \
              -I../../include \
@
