Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4bcb80a

Browse files
committed
Update contrib intarray to Jan 25 version.
1 parent 5a38af7 commit 4bcb80a

File tree

7 files changed

+816
-266
lines changed

7 files changed

+816
-266
lines changed

contrib/intarray/Makefile

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.3 2001/02/20 19:20:27 petere Exp $
2-
31
subdir = contrib/intarray
42
top_builddir = ../..
53
include $(top_builddir)/src/Makefile.global
@@ -12,7 +10,7 @@ NAME= _int
1210
SO_MAJOR_VERSION= 1
1311
SO_MINOR_VERSION= 0
1412

15-
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DPGSQL71
13+
override CPPFLAGS += -I$(srcdir) -DPGSQL71
1614

1715
OBJS= _int.o
1816

@@ -23,31 +21,46 @@ include $(top_srcdir)/src/Makefile.shlib
2321

2422

2523
$(NAME).sql: $(NAME).sql.in
26-
sed 's,MODULE_PATHNAME,$(libdir)/$(shlib),g' $< >$@
24+
sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
2725

2826
.PHONY: submake
2927
submake:
3028
$(MAKE) -C $(top_builddir)/src/test/regress pg_regress
3129

30+
# against installed postmaster
3231
installcheck: submake
3332
$(top_builddir)/src/test/regress/pg_regress _int
3433

34+
# in-tree test doesn't work yet (no way to install my shared library)
35+
#check: all submake
36+
# $(top_builddir)/src/test/regress/pg_regress --temp-install \
37+
# --top-builddir=$(top_builddir) _int
3538
check:
36-
@echo "'$(MAKE) check' is not supported."
37-
@echo "Do '$(MAKE) install', then '$(MAKE) installcheck' instead."
39+
@echo "'make check' is not supported."
40+
@echo "Do 'make install', then 'make installcheck' instead."
3841

3942
install: all installdirs install-lib
40-
$(INSTALL_DATA) $(srcdir)/README.intarray $(docdir)/contrib
43+
#$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
4144
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
4245

4346
installdirs:
4447
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
4548

4649
uninstall: uninstall-lib
47-
rm -f $(docdir)/contrib/README.intarray $(datadir)/contrib/$(NAME).sql
50+
rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
4851

4952
clean distclean maintainer-clean: clean-lib
50-
rm -f $(OBJS) $(NAME).sql
53+
rm -f *.so y.tab.c y.tab.h $(OBJS) $(NAME).sql
5154
# things created by various check targets
52-
rm -rf results
53-
rm -f regression.diffs regression.out
55+
rm -rf results tmp_check log
56+
rm -f regression.diffs regression.out regress.out run_check.out
57+
ifeq ($(PORTNAME), win)
58+
rm -f regress.def
59+
endif
60+
61+
depend dep:
62+
$(CC) -MM $(CFLAGS) *.c >depend
63+
64+
ifeq (depend,$(wildcard depend))
65+
include depend
66+
endif

contrib/intarray/README.intarray

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
This is an implementation of RD-tree data structure using GiST interface
22
of PostgreSQL. It has built-in lossy compression - must be declared
3-
in index creation - with (islossy). Current implementation has index support
4-
for one-dimensional array of int4's.
3+
in index creation - with (islossy). Current implementation provides index
4+
support for one-dimensional array of int4's - gist__int_ops, suitable for
5+
small and medium size of arrays (used on default), and gist__intbig_ops for
6+
indexing large arrays (we use superimposed signature with length of 4096
7+
bits to represent sets).
8+
59
All work was done by Teodor Sigaev (teodor@stack.net) and Oleg Bartunov
610
(oleg@sai.msu.su). See http://www.sai.msu.su/~megera/postgres/gist
711
for additional information.
@@ -25,7 +29,7 @@ EXAMPLE USAGE:
2529
-- create indices
2630
CREATE unique index message_key on message ( mid );
2731
CREATE unique index message_section_map_key2 on message_section_map (sid, mid );
28-
CREATE INDEX message_rdtree_idx on message using gist ( sections ) with ( islossy );
32+
CREATE INDEX message_rdtree_idx on message using gist ( sections gist__int_ops) with ( islossy );
2933

3034
-- select some messages with section in 1 OR 2 - OVERLAP operator
3135
select message.mid from message where message.sections && '{1,2}';

0 commit comments

Comments
 (0)