2010-09-20 22:08:53 +02:00
|
|
|
# contrib/cube/Makefile
|
2000-12-11 21:39:15 +01:00
|
|
|
|
2001-09-06 12:49:30 +02:00
|
|
|
MODULE_big = cube
|
2014-07-14 20:07:52 +02:00
|
|
|
OBJS= cube.o cubeparse.o $(WIN32RES)
|
2000-12-11 21:39:15 +01:00
|
|
|
|
2011-02-14 02:06:41 +01:00
|
|
|
EXTENSION = cube
|
Support index-only scans in contrib/cube and contrib/seg GiST indexes.
To do this, we only have to remove the compress and decompress support
functions, which have never done anything more than detoasting.
In the wake of commit d3a4f89d8, this results in automatically enabling
index-only scans, since the core code will now know that the stored
representation is the same as the original data (up to detoasting).
The only exciting part of this is that ALTER OPERATOR FAMILY lacks
a way to drop a support function that was declared as being part of
an opclass rather than being loose in the family. For the moment,
we'll hack our way to a solution with a manual update of the pg_depend
entry type, which is what distinguishes the two cases. Perhaps
someday it'll be worth providing a cleaner way to do that, but for
now it seems like a very niche problem.
Note that the underlying C functions remain, to support use of the shared
libraries with older versions of the modules' SQL declarations. Someday
we may be able to remove them, but not soon.
Andrey Borodin, reviewed by me
Discussion: https://postgr.es/m/D0F53A05-4F4A-4DEC-8339-3C069FA0EE11@yandex-team.ru
2017-11-21 02:25:18 +01:00
|
|
|
DATA = cube--1.2.sql cube--1.2--1.3.sql cube--1.3--1.4.sql \
|
Distinguish selectivity of < from <= and > from >=.
Historically, the selectivity functions have simply not distinguished
< from <=, or > from >=, arguing that the fraction of the population that
satisfies the "=" aspect can be considered to be vanishingly small, if the
comparison value isn't any of the most-common-values for the variable.
(If it is, the code path that executes the operator against each MCV will
take care of things properly.) But that isn't really true unless we're
dealing with a continuum of variable values, and in practice we seldom are.
If "x = const" would estimate a nonzero number of rows for a given const
value, then it follows that we ought to estimate different numbers of rows
for "x < const" and "x <= const", even if the const is not one of the MCVs.
Handling this more honestly makes a significant difference in edge cases,
such as the estimate for a tight range (x BETWEEN y AND z where y and z
are close together).
Hence, split scalarltsel into scalarltsel/scalarlesel, and similarly
split scalargtsel into scalargtsel/scalargesel. Adjust <= and >=
operator definitions to reference the new selectivity functions.
Improve the core ineq_histogram_selectivity() function to make a
correction for equality. (Along the way, I learned quite a bit about
exactly why that function gives good answers, which I tried to memorialize
in improved comments.)
The corresponding join selectivity functions were, and remain, just stubs.
But I chose to split them similarly, to avoid confusion and to prevent the
need for doing this exercise again if someone ever makes them less stubby.
In passing, change ineq_histogram_selectivity's clamp for extreme
probability estimates so that it varies depending on the histogram
size, instead of being hardwired at 0.0001. With the default histogram
size of 100 entries, you still get the old clamp value, but bigger
histograms should allow us to put more faith in edge values.
Tom Lane, reviewed by Aleksander Alekseev and Kuntal Ghosh
Discussion: https://postgr.es/m/12232.1499140410@sss.pgh.pa.us
2017-09-13 17:12:39 +02:00
|
|
|
cube--1.1--1.2.sql cube--1.0--1.1.sql \
|
2016-06-09 22:44:25 +02:00
|
|
|
cube--unpackaged--1.0.sql
|
2014-07-14 20:07:52 +02:00
|
|
|
PGFILEDESC = "cube - multidimensional cube data type"
|
2011-02-14 02:06:41 +01:00
|
|
|
|
2018-07-31 20:58:39 +02:00
|
|
|
HEADERS = cubedata.h
|
|
|
|
|
2001-09-06 12:49:30 +02:00
|
|
|
REGRESS = cube
|
2000-12-11 21:39:15 +01:00
|
|
|
|
2006-04-03 20:47:41 +02:00
|
|
|
EXTRA_CLEAN = y.tab.c y.tab.h
|
2004-08-20 22:13:10 +02:00
|
|
|
|
2005-07-25 01:30:10 +02:00
|
|
|
SHLIB_LINK += $(filter -lm, $(LIBS))
|
2004-08-20 22:13:10 +02:00
|
|
|
|
|
|
|
ifdef USE_PGXS
|
2007-06-27 00:05:04 +02:00
|
|
|
PG_CONFIG = pg_config
|
|
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
2004-08-20 22:13:10 +02:00
|
|
|
include $(PGXS)
|
|
|
|
else
|
|
|
|
subdir = contrib/cube
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
|
|
endif
|
|
|
|
|
2000-12-11 21:39:15 +01:00
|
|
|
|
2002-11-01 23:52:34 +01:00
|
|
|
# cubescan is compiled as part of cubeparse
|
2009-08-28 22:26:19 +02:00
|
|
|
cubeparse.o: cubescan.c
|
2002-11-01 23:52:34 +01:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
distprep: cubeparse.c cubescan.c
|
2006-04-03 20:47:41 +02:00
|
|
|
|
|
|
|
maintainer-clean:
|
2009-08-28 22:26:19 +02:00
|
|
|
rm -f cubeparse.c cubescan.c
|