Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgrespro/rum
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.10
Choose a base ref
...
head repository: postgrespro/rum
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 14, 2022

  1. Copy the full SHA
    933e8b5 View commit details

Commits on Mar 1, 2022

  1. Update copyrights

    pashkinelfe committed Mar 1, 2022
    Copy the full SHA
    d9cc86f View commit details

Commits on May 6, 2022

  1. Compatibility with random access tuplesort interface changes in v15

    Also update tuplesort15.c according to vanilla changes.
    pashkinelfe committed May 6, 2022
    Copy the full SHA
    5e8be02 View commit details

Commits on May 25, 2022

  1. Copy the full SHA
    c538b9f View commit details

Commits on May 27, 2022

  1. Fix build with enable-dtrace

    refer to issue #108
    Maxim Orlov committed May 27, 2022
    Copy the full SHA
    7197b83 View commit details
  2. Merge branch 'master' into stable

    Maxim Orlov committed May 27, 2022
    Copy the full SHA
    f20f100 View commit details
  3. Copy the full SHA
    fc3b03b View commit details

Commits on May 30, 2022

  1. * Fix travis warnings

    root: deprecated key sudo (The key `sudo` has no effect anymore.)
    root: missing dist, using the default xenial
    root: missing os, using the default linux
    
    * Add pg-15
    kulaginm authored and pashkinelfe committed May 30, 2022
    Copy the full SHA
    92f42d5 View commit details

Commits on Jul 11, 2022

  1. Copy the full SHA
    6a57545 View commit details

Commits on Jul 21, 2022

  1. Revert "Make compatible with amroutine changes in V15"

    Change in IndexAmRoutine amroutine were reverted in
    e3fcca0d Revert changes in HOT handling of BRIN indexes
    
    This reverts commit 6f47dc7.
    funny-falcon committed Jul 21, 2022
    Copy the full SHA
    210abdd View commit details

Commits on Jul 22, 2022

  1. Copy the full SHA
    1ffa817 View commit details

Commits on Aug 10, 2022

  1. Merge remote-tracking branch 'origin/master' into stable

    Marina Polyakova committed Aug 10, 2022
    Copy the full SHA
    de9909d View commit details

Commits on Aug 22, 2022

  1. Copy the full SHA
    6530adc View commit details

Commits on Sep 6, 2022

  1. Refactoring to be pg16 ready.

    Maxim Orlov committed Sep 6, 2022
    Copy the full SHA
    5719f28 View commit details
  2. Add support for pg16.

    Maxim Orlov committed Sep 6, 2022
    Copy the full SHA
    db8b9d6 View commit details

Commits on Sep 7, 2022

  1. Get rid of copying code from pg core.

    Maxim Orlov committed Sep 7, 2022
    Copy the full SHA
    919c74f View commit details

Commits on Sep 18, 2022

  1. Copy the full SHA
    775de3b View commit details

Commits on Sep 19, 2022

  1. Merge pull request #114 from shadforth/update-readme

    Update README with small language tweaks
    feodor authored Sep 19, 2022
    Copy the full SHA
    e6facb1 View commit details

Commits on Sep 29, 2022

  1. Copy the full SHA
    e49fce9 View commit details
  2. Merge remote-tracking branch 'origin/PGPRO-6780' into stable

    Conflicts:
    	src/rumsort.c
    
    Caused by the following commits:
    - 6530adc
      [PGPRO-6780] Fix Windows warnings
    - 5719f28
      Refactoring to be pg16 ready.
    - db8b9d6
      Add support for pg16.
    
    Thanks to Koval Dmitry for the review of conflict resolution.
    Marina Polyakova committed Sep 29, 2022
    Copy the full SHA
    4b8da39 View commit details

Commits on Nov 21, 2022

  1. Merge remote-tracking branch 'origin/master' into stable

    Marina Polyakova committed Nov 21, 2022
    Copy the full SHA
    884bd51 View commit details
  2. Fix compiler warnings due to new checks in PostgreSQL 16

    See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add
    -Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.
    
    src/ruminsert.c: In function ‘rumHeapTupleBulkInsert’:
    src/ruminsert.c:533:51: warning: declaration of ‘attr’ shadows a previous local
    [-Wshadow=compatible-local]
      533 |                                 Form_pg_attribute attr =
    RumTupleDescAttr(
          |                                                   ^~~~
    src/ruminsert.c:505:27: note: shadowed declaration is here
      505 |         Form_pg_attribute attr = buildstate->rumstate.addAttrs[attnum
    - 1];
          |                           ^~~~
    src/rumget.c: In function ‘startScanEntry’:
    src/rumget.c:635:41: warning: declaration of ‘page’ shadows a previous local
    [-Wshadow=compatible-local]
      635 |                         Page            page;
          |                                         ^~~~
    src/rumget.c:548:25: note: shadowed declaration is here
      548 |         Page            page;
          |                         ^~~~
    src/rumget.c: In function ‘entryGetNextItemList’:
    src/rumget.c:1054:33: warning: declaration of ‘page’ shadows a previous local
    [-Wshadow=compatible-local]
     1054 |                 Page            page;
          |                                 ^~~~
    src/rumget.c:986:25: note: shadowed declaration is here
      986 |         Page            page;
          |                         ^~~~
    Marina Polyakova committed Nov 21, 2022
    Copy the full SHA
    43465cb View commit details

Commits on Nov 22, 2022

  1. Merge pull request #115 from postgrespro/PGPRO-7444

    Fix compiler warnings due to new checks in PostgreSQL 16
    kovdb75 authored Nov 22, 2022
    Copy the full SHA
    7e641a8 View commit details

Commits on Dec 19, 2022

  1. Add PG15 into travis

    Maxim Orlov committed Dec 19, 2022
    Copy the full SHA
    bdfafed View commit details
  2. Add PG15 into travis

    Maxim Orlov committed Dec 19, 2022
    Copy the full SHA
    41d60e8 View commit details
  3. Disable core.DivideZero

    Since all the errors are from pg-core code (i.e. tuplesortXX.c)
    Maxim Orlov committed Dec 19, 2022
    Copy the full SHA
    51c6af4 View commit details

Commits on Jan 24, 2023

  1. Copy the full SHA
    61443b9 View commit details

Commits on Jan 27, 2023

  1. Merge remote-tracking branch 'origin/master' into stable

    Marina Polyakova committed Jan 27, 2023
    Copy the full SHA
    e4301db View commit details
  2. [PGPRO-6780] Fix Windows warnings

    kovdb75 authored and Maxim Orlov committed Jan 27, 2023
    Copy the full SHA
    bfd9eba View commit details
  3. Fix compiler warnings due to new checks in PostgreSQL 16

    See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add
    -Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.
    
    src/ruminsert.c: In function ‘rumHeapTupleBulkInsert’:
    src/ruminsert.c:533:51: warning: declaration of ‘attr’ shadows a previous local
    [-Wshadow=compatible-local]
      533 |                                 Form_pg_attribute attr =
    RumTupleDescAttr(
          |                                                   ^~~~
    src/ruminsert.c:505:27: note: shadowed declaration is here
      505 |         Form_pg_attribute attr = buildstate->rumstate.addAttrs[attnum
    - 1];
          |                           ^~~~
    src/rumget.c: In function ‘startScanEntry’:
    src/rumget.c:635:41: warning: declaration of ‘page’ shadows a previous local
    [-Wshadow=compatible-local]
      635 |                         Page            page;
          |                                         ^~~~
    src/rumget.c:548:25: note: shadowed declaration is here
      548 |         Page            page;
          |                         ^~~~
    src/rumget.c: In function ‘entryGetNextItemList’:
    src/rumget.c:1054:33: warning: declaration of ‘page’ shadows a previous local
    [-Wshadow=compatible-local]
     1054 |                 Page            page;
          |                                 ^~~~
    src/rumget.c:986:25: note: shadowed declaration is here
      986 |         Page            page;
          |                         ^~~~
    Marina Polyakova authored and Maxim Orlov committed Jan 27, 2023
    Copy the full SHA
    d387682 View commit details
  4. Merge remote-tracking branch 'origin/stable'

    Marina Polyakova committed Jan 27, 2023
    Copy the full SHA
    4fa7605 View commit details

Commits on Jan 31, 2023

  1. Copy the full SHA
    eceff46 View commit details

Commits on Feb 3, 2023

  1. Merge remote-tracking branch 'origin/PGPRO-7470'

    Marina Polyakova committed Feb 3, 2023
    Copy the full SHA
    43d0fe7 View commit details

Commits on Feb 14, 2023

  1. Add tap test run in installcheck

    Maxim Orlov committed Feb 14, 2023
    Copy the full SHA
    3eecc14 View commit details

Commits on Feb 15, 2023

  1. Fix double tap test run on pg12+

    Maxim Orlov committed Feb 15, 2023
    Copy the full SHA
    5a405c0 View commit details
  2. Compacting SPECIFIC_TAP conditions

    Maxim Orlov committed Feb 15, 2023
    Copy the full SHA
    c40b86e View commit details

Commits on Oct 3, 2023

  1. Copy the full SHA
    8c49086 View commit details
  2. Changes for travis-ci

    kovdb75 committed Oct 3, 2023
    Copy the full SHA
    61258f4 View commit details

Commits on Oct 11, 2023

  1. [PGPRO-8962] Remove unused variable.

    Variable 'totalCount'.
    It appeared in c1df4cc
    and was already unnecessary.
    
    Tags: rum.
    Ekaterina Sokolova committed Oct 11, 2023
    Copy the full SHA
    e6ba1ad View commit details

Commits on Oct 17, 2023

  1. Copy the full SHA
    6ccd052 View commit details

Commits on Oct 20, 2023

  1. Merge pull request #120 from postgrespro/PGPRO-8962

    Remove unused variable.
    sokolcati authored Oct 20, 2023
    Copy the full SHA
    8e8026c View commit details

Commits on Oct 25, 2023

  1. Merge remote-tracking branch 'origin/PGPRO-8894'

    Marina Polyakova committed Oct 25, 2023
    Copy the full SHA
    3b26d4d View commit details

Commits on Nov 17, 2023

  1. Merge remote-tracking branch 'origin/master' into PGPRO-9026

    Marina Polyakova committed Nov 17, 2023
    Copy the full SHA
    9e78b97 View commit details

Commits on Oct 7, 2024

  1. Add compatibility with PostgreSQL 17. (#129)

    Fix compiler error that was introduced by the commit 6ed83d5f (Use bump memory context for tuplesorts).
    Fix 'array' test.
    Fix Travis CI build.
    alexandervpotapov authored Oct 7, 2024
    Copy the full SHA
    cb1edff View commit details

Commits on Oct 8, 2024

  1. Merge pull request #116 from postgrespro/update-travis-dist

    Switch to Ubuntu 22.04 in Travis
    sokolcati authored Oct 8, 2024
    Copy the full SHA
    6a065fd View commit details

Commits on Oct 23, 2024

  1. Update configuration for Travis CI.

    Ekaterina Sokolova committed Oct 23, 2024
    Copy the full SHA
    181b802 View commit details
  2. Update copyrights.

    Ekaterina Sokolova committed Oct 23, 2024
    Copy the full SHA
    331863c View commit details

Commits on Nov 1, 2024

  1. Merge pull request #134 from postgrespro/PGPRO-11422

    Add check in Travis CI and update copyrights.
    sokolcati authored Nov 1, 2024
    Copy the full SHA
    a23de3d View commit details

Commits on Nov 22, 2024

  1. Fixed the content of the error message (#133)

    Fixed the content of the error message
    
    If the "rum" index is created without the "WITH" operator,
    two columns must be specified for "ORDER BY" to work.
    But now error message in this case looks like:
    
      "ERROR: cannot order without attribute ... in WHERE clause"
    
    Fixed the content of error message: "WHERE" replaced by "ORDER BY".
    
    Added a test that checks the case when only one column is
    specified in the "ORDER BY" and error message for this.
    
    Tags: rum.
    arseny114 authored Nov 22, 2024
    Copy the full SHA
    34619f9 View commit details

Commits on Dec 6, 2024

  1. Stabilize array test. (#135)

    Make this test output more independent of PostgreSQL server
    version and system.
    
    Authored-by: Karina Litskevich <k.lickevich@postgrespro.ru>
    Green-Chan authored Dec 6, 2024
    Copy the full SHA
    f82ab18 View commit details
Showing with 1,983 additions and 6,183 deletions.
  1. +1 −0 .gitignore
  2. +9 −5 .travis.yml
  3. +1 −1 LICENSE
  4. +31 −18 Makefile
  5. +54 −33 README.md
  6. +9 −0 expected/altorder.out
  7. +9 −0 expected/altorder_1.out
  8. +9 −0 expected/altorder_hash.out
  9. +9 −0 expected/altorder_hash_1.out
  10. +58 −19 expected/array.out
  11. +58 −19 expected/array_1.out
  12. +26 −0 expected/expr.out
  13. +9 −0 expected/float8.out
  14. +9 −0 expected/float8_1.out
  15. +9 −0 expected/int8.out
  16. +9 −0 expected/int8_1.out
  17. +9 −0 expected/money.out
  18. +9 −0 expected/money_1.out
  19. +14 −0 expected/orderby.out
  20. +14 −0 expected/orderby_1.out
  21. +9 −0 expected/orderby_hash.out
  22. +9 −0 expected/orderby_hash_1.out
  23. +340 −260 expected/predicate-rum-2.out
  24. +0 −501 expected/predicate-rum-2_1.out
  25. +342 −280 expected/predicate-rum.out
  26. +0 −521 expected/predicate-rum_1.out
  27. +11 −1 expected/rum_validate.out
  28. +9 −0 expected/timestamp.out
  29. +9 −0 expected/timestamp_1.out
  30. +0 −335 gen_rum_sql--1.0--1.1.pl
  31. +0 −183 gen_rum_sql--1.1--1.2.pl
  32. +118 −0 meson.build
  33. +0 −411 rum--1.0.sql
  34. +0 −1,513 rum--1.1.sql
  35. +0 −1,707 rum--1.2.sql
  36. 0 rum--1.3.sql → rum_init.sql
  37. +14 −10 specs/predicate-rum-2.spec
  38. +14 −10 specs/predicate-rum.spec
  39. +11 −0 sql/altorder.sql
  40. +11 −0 sql/altorder_hash.sql
  41. +45 −4 sql/array.sql
  42. +21 −0 sql/expr.sql
  43. +11 −0 sql/float8.sql
  44. +11 −0 sql/int8.sql
  45. +11 −0 sql/money.sql
  46. +18 −0 sql/orderby.sql
  47. +11 −0 sql/orderby_hash.sql
  48. +7 −1 sql/rum_validate.sql
  49. +10 −0 sql/timestamp.sql
  50. +33 −0 src/disable_core_macro.h
  51. +21 −21 src/rum.h
  52. +1 −1 src/rum_arr_utils.c
  53. +10 −3 src/rum_ts_utils.c
  54. +1 −1 src/rumbtree.c
  55. +1 −1 src/rumbulk.c
  56. +1 −7 src/rumdatapage.c
  57. +1 −1 src/rumentrypage.c
  58. +1 −3 src/rumget.c
  59. +3 −3 src/ruminsert.c
  60. +2 −2 src/rumscan.c
  61. +253 −102 src/rumsort.c
  62. +1 −1 src/rumsort.h
  63. +1 −1 src/rumtsquery.c
  64. +4 −4 src/rumutil.c
  65. +1 −1 src/rumvacuum.c
  66. +1 −1 src/rumvalidate.c
  67. +2 −0 src/tuplesort10.c
  68. +2 −0 src/tuplesort11.c
  69. +2 −0 src/tuplesort12.c
  70. +2 −0 src/tuplesort13.c
  71. +2 −0 src/tuplesort14.c
  72. +23 −23 src/tuplesort15.c
  73. +2 −0 src/tuplesort96.c
  74. +207 −0 t/002_pglist.pl
  75. +0 −14 tests/README.md
  76. 0 tests/__init__.py
  77. +0 −157 tests/pglist_tests.py
  78. +2 −2 travis/Dockerfile.in
  79. +2 −1 travis/docker-compose.yml
  80. +3 −1 travis/run_tests.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
results
__pycache__
*.pyc
rum--*.sql
tmp_install
log

14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sudo: required
os: linux

dist: jammy

language: c

@@ -21,13 +23,15 @@ notifications:
on_failure: always

env:
- PG_VERSION=17
- PG_VERSION=17 LEVEL=hardcore
- PG_VERSION=16
- PG_VERSION=16 LEVEL=hardcore
- PG_VERSION=15
- PG_VERSION=15 LEVEL=hardcore
- PG_VERSION=14
- PG_VERSION=14 LEVEL=hardcore
- PG_VERSION=13
- PG_VERSION=13 LEVEL=hardcore
- PG_VERSION=12
- PG_VERSION=12 LEVEL=hardcore
- PG_VERSION=11
- PG_VERSION=11 LEVEL=hardcore
- PG_VERSION=10
- PG_VERSION=10 LEVEL=hardcore
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUM is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.

Portions Copyright (c) 2015-2019, Postgres Professional
Portions Copyright (c) 2015-2024, Postgres Professional
Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
Portions Copyright (c) 1994, The Regents of the University of California

49 changes: 31 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -11,14 +11,10 @@ OBJS = src/rumsort.o src/rum_ts_utils.o src/rumtsquery.o \
src/rumscan.o src/rumutil.o src/rumvacuum.o src/rumvalidate.o \
src/btree_rum.o src/rum_arr_utils.o $(WIN32RES)

DATA_first = rum--1.0.sql
DATA_updates = rum--1.0--1.1.sql rum--1.1--1.2.sql \
rum--1.2--1.3.sql

DATA = $(DATA_first) rum--$(EXTVERSION).sql $(DATA_updates)

# Do not use DATA_built. It removes built files if clean target was used
SQL_built = rum--$(EXTVERSION).sql $(DATA_updates)
DATA_built = $(EXTENSION)--$(EXTVERSION).sql

INCLUDES = rum.h rumsort.h
RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES))
@@ -28,11 +24,26 @@ LDFLAGS_SL += $(filter -lm, $(LIBS))
REGRESS = security rum rum_validate rum_hash ruminv timestamp orderby orderby_hash \
altorder altorder_hash limits \
int2 int4 int8 float4 float8 money oid \
time timetz date interval \
macaddr inet cidr text varchar char bytea bit varbit \
numeric rum_weight
time timetz date interval \
macaddr inet cidr text varchar char bytea bit varbit \
numeric rum_weight expr

TAP_TESTS = 1

ISOLATION = predicate-rum predicate-rum-2
ISOLATION_OPTS = --load-extension=rum
EXTRA_CLEAN = pglist_tmp

ifdef USE_PGXS

# We cannot run isolation test for versions 12,13 in PGXS case
# because 'pg_isolation_regress' is not copied to install
# directory, see src/test/isolation/Makefile
ifeq ($(MAJORVERSION),$(filter 12% 13%,$(MAJORVERSION)))
undefine ISOLATION
undefine ISOLATION_OPTS
endif

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
@@ -43,26 +54,27 @@ include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

$(EXTENSION)--$(EXTVERSION).sql: rum_init.sql
cat $^ > $@

ifeq ($(MAJORVERSION), 9.6)
# arrays are not supported on 9.6
else
REGRESS += array
endif

# For 9.6-11 we have to make specific target with tap tests
ifeq ($(MAJORVERSION), $(filter 9.6% 10% 11%, $(MAJORVERSION)))
wal-check: temp-install
$(prove_check)

check: wal-check
endif

all: $(SQL_built)

#9.6 requires 1.3 file but 10.0 could live with update files
rum--$(EXTVERSION).sql: $(DATA_first) $(DATA_updates)
cat $(DATA_first) $(DATA_updates) > rum--$(EXTVERSION).sql

# rule for updates, e.g. rum--1.0--1.1.sql
rum--%.sql: gen_rum_sql--%.pl
perl $< > $@
#
# Make conditional targets to save backward compatibility with PG11, PG10 and PG9.6.
#
ifeq ($(MAJORVERSION), $(filter 9.6% 10% 11%, $(MAJORVERSION)))

install: installincludes

@@ -85,5 +97,6 @@ submake-rum:

isolationcheck: | submake-isolation submake-rum temp-install
$(pg_isolation_regress_check) \
--temp-config $(top_srcdir)/contrib/rum/logical.conf \
--temp-config $(top_srcdir)/contrib/rum/logical.conf \
$(ISOLATIONCHECKS)
endif
87 changes: 54 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,38 +8,38 @@

## Introduction

The **rum** module provides access method to work with `RUM` index. It is based
on the `GIN` access methods code.
The **rum** module provides an access method to work with a `RUM` index. It is based
on the `GIN` access method's code.

`GIN` index allows to perform fast full text search using `tsvector` and
`tsquery` types. But full text search with GIN index has several problems:
A `GIN` index allows performing fast full-text search using `tsvector` and
`tsquery` types. But full-text search with a GIN index has several problems:

- Slow ranking. It is need position information about lexems to ranking. `GIN`
index doesn't store positions of lexems. So after index scan we need additional
heap scan to retrieve lexems positions.
- Slow phrase search with `GIN` index. This problem relates with previous
problem. It is need position information to perform phrase search.
- Slow ordering by timestamp. `GIN` index can't store some related information
in index with lexemes. So it is necessary to perform additional heap scan.
- Slow ranking. It needs positional information about lexemes to do ranking. A `GIN`
index doesn't store positions of lexemes. So after index scanning, we need an
additional heap scan to retrieve lexeme positions.
- Slow phrase search with a `GIN` index. This problem relates to the previous
problem. It needs positional information to perform phrase search.
- Slow ordering by timestamp. A `GIN` index can't store some related information
in the index with lexemes. So it is necessary to perform an additional heap scan.

`RUM` solves this problems by storing additional information in posting tree.
`RUM` solves these problems by storing additional information in a posting tree.
For example, positional information of lexemes or timestamps. You can get an
idea of `RUM` by the following picture:
idea of `RUM` with the following diagram:

![How RUM stores additional information](img/gin_rum.png)

Drawback of `RUM` is that it has slower build and insert time than `GIN`.
It is because we need to store additional information besides keys and because
`RUM` uses generic WAL records.
A drawback of `RUM` is that it has slower build and insert times than `GIN`.
This is because we need to store additional information besides keys and because
`RUM` uses generic Write-Ahead Log (WAL) records.

## License

This module available under the [license](LICENSE) similar to
This module is available under the [license](LICENSE) similar to
[PostgreSQL](http://www.postgresql.org/about/licence/).

## Installation

Before build and install **rum** you should ensure following:
Before building and installing **rum**, you should ensure following are installed:

* PostgreSQL version is 9.6+.

@@ -60,9 +60,29 @@ Typical installation procedure may look like this:

> **Important:** Don't forget to set the `PG_CONFIG` variable in case you want to test `RUM` on a custom build of PostgreSQL. Read more [here](https://wiki.postgresql.org/wiki/Building_and_Installing_PostgreSQL_Extension_Modules).
## Tests

$ make check

This command runs:
- regression tests;
- isolation tests;
- tap tests.

One of the tap tests downloads a 1GB archive and then unpacks it
into a file weighing almost 3GB. It is disabled by default.

To run this test, you need to set an environment variable:

$ export PG_TEST_EXTRA=big_values

The way to turn it off again:

$ export -n PG_TEST_EXTRA

## Common operators and functions

**rum** module provides next operators.
The **rum** module provides next operators.

| Operator | Returns | Description
| -------------------- | ------- | ----------------------------------------------
@@ -71,19 +91,19 @@ Typical installation procedure may look like this:
| timestamp &lt;=&#124; timestamp | float8 | Returns distance only for left timestamps.
| timestamp &#124;=&gt; timestamp | float8 | Returns distance only for right timestamps.

Last three operations also works for types timestamptz, int2, int4, int8, float4, float8,
The last three operations also work for types timestamptz, int2, int4, int8, float4, float8,
money and oid.

## Operator classes

**rum** provides next operator classes.
**rum** provides the following operator classes.

### rum_tsvector_ops

For type: `tsvector`

This operator class stores `tsvector` lexemes with positional information. Supports
ordering by `<=>` operator and prefix search. There is the example.
This operator class stores `tsvector` lexemes with positional information. It supports
ordering by the `<=>` operator and prefix search. See the example below.

Let us assume we have the table:

@@ -140,8 +160,8 @@ SELECT t, a <=> to_tsquery('english', 'place | situation') AS rank

For type: `tsvector`

This operator class stores hash of `tsvector` lexemes with positional information.
Supports ordering by `<=>` operator. But **doesn't** support prefix search.
This operator class stores a hash of `tsvector` lexemes with positional information.
It supports ordering by the `<=>` operator. It **doesn't** support prefix search.

### rum_TYPE_ops

@@ -153,17 +173,18 @@ Supported operations: `<`, `<=`, `=`, `>=`, `>` for all types and
`<=>`, `<=|` and `|=>` for int2, int4, int8, float4, float8, money, oid,
timestamp and timestamptz types.

Supports ordering by `<=>`, `<=|` and `|=>` operators. Can be used with
This operator supports ordering by the `<=>`, `<=|` and `|=>` operators. It can be used with
`rum_tsvector_addon_ops`, `rum_tsvector_hash_addon_ops' and `rum_anyarray_addon_ops` operator classes.

### rum_tsvector_addon_ops

For type: `tsvector`

This operator class stores `tsvector` lexems with any supported by module
field. There is the example.
This operator class stores `tsvector` lexemes with any supported by module
field. See the example below.

Let us assume we have the table:

```sql
CREATE TABLE tsts (id int, t tsvector, d timestamp);

@@ -202,16 +223,16 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY

For type: `tsvector`

This operator class stores hash of `tsvector` lexems with any supported by module
This operator class stores a hash of `tsvector` lexemes with any supported by module
field.

**Doesn't** support prefix search.
It **doesn't** support prefix search.

### rum_tsquery_ops

For type: `tsquery`

Stores branches of query tree in additional information. For example we have the table:
It stores branches of query tree in additional information. For example, we have the table:
```sql
CREATE TABLE query (q tsquery, tag text);

@@ -240,8 +261,8 @@ SELECT * FROM query
For type: `anyarray`

This operator class stores `anyarray` elements with length of the array.
Supports operators `&&`, `@>`, `<@`, `=`, `%` operators. Supports ordering by `<=>` operator.
For example we have the table:
It supports operators `&&`, `@>`, `<@`, `=`, `%` operators. It also supports ordering by `<=>` operator.
For example, we have the table:

```sql
CREATE TABLE test_array (i int2[]);
9 changes: 9 additions & 0 deletions expected/altorder.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* ------------------------------------
* NOTE: This test behaves differenly
* ------------------------------------
*
* altorder.out - test output for 64-bit systems and
* altorder_1.out - test output for 32-bit systems.
*
*/
CREATE TABLE atsts (id int, t tsvector, d timestamp);
\copy atsts from 'data/tsts.data'
-- PGPRO-2537: We need more data to test rumsort.c with logtape.c
9 changes: 9 additions & 0 deletions expected/altorder_1.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* ------------------------------------
* NOTE: This test behaves differenly
* ------------------------------------
*
* altorder.out - test output for 64-bit systems and
* altorder_1.out - test output for 32-bit systems.
*
*/
CREATE TABLE atsts (id int, t tsvector, d timestamp);
\copy atsts from 'data/tsts.data'
-- PGPRO-2537: We need more data to test rumsort.c with logtape.c
9 changes: 9 additions & 0 deletions expected/altorder_hash.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* ------------------------------------
* NOTE: This test behaves differenly
* ------------------------------------
*
* altorder_hash.out - test output for 64-bit systems and
* altorder_hash_1.out - test output for 32-bit systems.
*
*/
CREATE TABLE atstsh (id int, t tsvector, d timestamp);
\copy atstsh from 'data/tsts.data'
CREATE INDEX atstsh_idx ON atstsh USING rum (t rum_tsvector_hash_addon_ops, d)
9 changes: 9 additions & 0 deletions expected/altorder_hash_1.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* ------------------------------------
* NOTE: This test behaves differenly
* ------------------------------------
*
* altorder_hash.out - test output for 64-bit systems and
* altorder_hash_1.out - test output for 32-bit systems.
*
*/
CREATE TABLE atstsh (id int, t tsvector, d timestamp);
\copy atstsh from 'data/tsts.data'
CREATE INDEX atstsh_idx ON atstsh USING rum (t rum_tsvector_hash_addon_ops, d)
Loading