mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
BRIN minmax-multi indexes
Adds BRIN opclasses similar to the existing minmax, except that instead of summarizing the page range into a single [min,max] range, the summary consists of multiple ranges and/or points, allowing gaps. This allows more efficient handling of data with poor correlation to physical location within the table and/or outlier values, for which the regular minmax opclassed tend to work poorly. It's possible to specify the number of values kept for each page range, either as a single point or an interval boundary. CREATE TABLE t (a int); CREATE INDEX ON t USING brin (a int4_minmax_multi_ops(values_per_range=16)); When building the summary, the values are combined into intervals with the goal to minimize the "covering" (sum of interval lengths), using a support procedure computing distance between two values. Bump catversion, due to various catalog changes. Author: Tomas Vondra <tomas.vondra@postgresql.org> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Sokolov Yura <y.sokolov@postgrespro.ru> Reviewed-by: John Naylor <john.naylor@enterprisedb.com> Discussion: https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.com Discussion: https://postgr.es/m/5d78b774-7e9c-c94e-12cf-fef51cc89b1a%402ndquadrant.com
This commit is contained in:
@ -17,6 +17,7 @@ OBJS = \
|
||||
brin_bloom.o \
|
||||
brin_inclusion.o \
|
||||
brin_minmax.o \
|
||||
brin_minmax_multi.o \
|
||||
brin_pageops.o \
|
||||
brin_revmap.o \
|
||||
brin_tuple.o \
|
||||
|
3036
src/backend/access/brin/brin_minmax_multi.c
Normal file
3036
src/backend/access/brin/brin_minmax_multi.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -159,6 +159,14 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple,
|
||||
if (tuple->bt_columns[keyno].bv_hasnulls)
|
||||
anynulls = true;
|
||||
|
||||
/* If needed, serialize the values before forming the on-disk tuple. */
|
||||
if (tuple->bt_columns[keyno].bv_serialize)
|
||||
{
|
||||
tuple->bt_columns[keyno].bv_serialize(brdesc,
|
||||
tuple->bt_columns[keyno].bv_mem_value,
|
||||
tuple->bt_columns[keyno].bv_values);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now obtain the values of each stored datum. Note that some values
|
||||
* might be toasted, and we cannot rely on the original heap values
|
||||
@ -512,6 +520,11 @@ brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc)
|
||||
dtuple->bt_columns[i].bv_allnulls = true;
|
||||
dtuple->bt_columns[i].bv_hasnulls = false;
|
||||
dtuple->bt_columns[i].bv_values = (Datum *) currdatum;
|
||||
|
||||
dtuple->bt_columns[i].bv_mem_value = PointerGetDatum(NULL);
|
||||
dtuple->bt_columns[i].bv_serialize = NULL;
|
||||
dtuple->bt_columns[i].bv_context = dtuple->bt_context;
|
||||
|
||||
currdatum += sizeof(Datum) * brdesc->bd_info[i]->oi_nstored;
|
||||
}
|
||||
|
||||
@ -591,6 +604,10 @@ brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
|
||||
|
||||
dtup->bt_columns[keyno].bv_hasnulls = hasnulls[keyno];
|
||||
dtup->bt_columns[keyno].bv_allnulls = false;
|
||||
|
||||
dtup->bt_columns[keyno].bv_mem_value = PointerGetDatum(NULL);
|
||||
dtup->bt_columns[keyno].bv_serialize = NULL;
|
||||
dtup->bt_columns[keyno].bv_context = dtup->bt_context;
|
||||
}
|
||||
|
||||
MemoryContextSwitchTo(oldcxt);
|
||||
|
@ -14,6 +14,11 @@
|
||||
#include "access/brin_internal.h"
|
||||
#include "access/tupdesc.h"
|
||||
|
||||
/*
|
||||
* The BRIN opclasses may register serialization callback, in case the on-disk
|
||||
* and in-memory representations differ (e.g. for performance reasons).
|
||||
*/
|
||||
typedef void (*brin_serialize_callback_type) (BrinDesc *bdesc, Datum src, Datum *dst);
|
||||
|
||||
/*
|
||||
* A BRIN index stores one index tuple per page range. Each index tuple
|
||||
@ -27,6 +32,9 @@ typedef struct BrinValues
|
||||
bool bv_hasnulls; /* are there any nulls in the page range? */
|
||||
bool bv_allnulls; /* are all values nulls in the page range? */
|
||||
Datum *bv_values; /* current accumulated values */
|
||||
Datum bv_mem_value; /* expanded accumulated values */
|
||||
MemoryContext bv_context;
|
||||
brin_serialize_callback_type bv_serialize;
|
||||
} BrinValues;
|
||||
|
||||
/*
|
||||
|
@ -161,18 +161,18 @@ FullTransactionIdAdvance(FullTransactionId *dest)
|
||||
* development purposes (such as in-progress patches and forks);
|
||||
* they should not appear in released versions.
|
||||
*
|
||||
* OIDs 10000-11999 are reserved for assignment by genbki.pl, for use
|
||||
* OIDs 10000-12999 are reserved for assignment by genbki.pl, for use
|
||||
* when the .dat files in src/include/catalog/ do not specify an OID
|
||||
* for a catalog entry that requires one.
|
||||
*
|
||||
* OIDS 12000-16383 are reserved for assignment during initdb
|
||||
* using the OID generator. (We start the generator at 12000.)
|
||||
* OIDS 13000-16383 are reserved for assignment during initdb
|
||||
* using the OID generator. (We start the generator at 13000.)
|
||||
*
|
||||
* OIDs beginning at 16384 are assigned from the OID generator
|
||||
* during normal multiuser operation. (We force the generator up to
|
||||
* 16384 as soon as we are in normal operation.)
|
||||
*
|
||||
* The choices of 8000, 10000 and 12000 are completely arbitrary, and can be
|
||||
* The choices of 8000, 10000 and 13000 are completely arbitrary, and can be
|
||||
* moved if we run low on OIDs in any category. Changing the macros below,
|
||||
* and updating relevant documentation (see bki.sgml and RELEASE_CHANGES),
|
||||
* should be sufficient to do this. Moving the 16384 boundary between
|
||||
@ -186,7 +186,7 @@ FullTransactionIdAdvance(FullTransactionId *dest)
|
||||
* ----------
|
||||
*/
|
||||
#define FirstGenbkiObjectId 10000
|
||||
#define FirstBootstrapObjectId 12000
|
||||
#define FirstBootstrapObjectId 13000
|
||||
#define FirstNormalObjectId 16384
|
||||
|
||||
/*
|
||||
|
@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 202103263
|
||||
#define CATALOG_VERSION_NO 202103264
|
||||
|
||||
#endif
|
||||
|
@ -2009,6 +2009,152 @@
|
||||
amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi integer
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int8,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int8,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int8,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int8,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int8,int8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int8,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int8,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int8,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int8,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int8,int2)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int8,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int8,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int8,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int8,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8',
|
||||
amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int8,int4)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int2,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int2,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int2,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int2,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int2,int2)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int2,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int2,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int2,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int2,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int2,int8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int2,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int2,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int2,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int2,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2',
|
||||
amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int2,int4)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int4,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int4,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int4,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int4,int4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int4,int4)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int4,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int4,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int4,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int4,int2)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int4,int2)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4',
|
||||
amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom integer
|
||||
|
||||
{ amopfamily => 'brin/integer_bloom_ops', amoplefttype => 'int8',
|
||||
@ -2062,6 +2208,23 @@
|
||||
amoprighttype => 'oid', amopstrategy => '5', amopopr => '>(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi oid
|
||||
{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '1', amopopr => '<(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '2', amopopr => '<=(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '3', amopopr => '=(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '4', amopopr => '>=(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '5', amopopr => '>(oid,oid)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom oid
|
||||
{ amopfamily => 'brin/oid_bloom_ops', amoplefttype => 'oid',
|
||||
amoprighttype => 'oid', amopstrategy => '1', amopopr => '=(oid,oid)',
|
||||
@ -2088,6 +2251,22 @@
|
||||
{ amopfamily => 'brin/tid_bloom_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '1', amopopr => '=(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
# minmax multi tid
|
||||
{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '1', amopopr => '<(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '2', amopopr => '<=(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '3', amopopr => '=(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '4', amopopr => '>=(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid',
|
||||
amoprighttype => 'tid', amopstrategy => '5', amopopr => '>(tid,tid)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax float (float4, float8)
|
||||
|
||||
@ -2155,6 +2334,72 @@
|
||||
amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi float (float4, float8)
|
||||
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float4,float4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '2',
|
||||
amopopr => '<=(float4,float4)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float4,float4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '4',
|
||||
amopopr => '>=(float4,float4)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float4,float4)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float4,float8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float8', amopstrategy => '2',
|
||||
amopopr => '<=(float4,float8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float4,float8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float8', amopstrategy => '4',
|
||||
amopopr => '>=(float4,float8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float4,float8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float8,float4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float4', amopstrategy => '2',
|
||||
amopopr => '<=(float8,float4)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float8,float4)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float4', amopstrategy => '4',
|
||||
amopopr => '>=(float8,float4)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float8,float4)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float8,float8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float8', amopstrategy => '2',
|
||||
amopopr => '<=(float8,float8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float8,float8)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float8', amopstrategy => '4',
|
||||
amopopr => '>=(float8,float8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8',
|
||||
amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom float
|
||||
{ amopfamily => 'brin/float_bloom_ops', amoplefttype => 'float4',
|
||||
amoprighttype => 'float4', amopstrategy => '1', amopopr => '=(float4,float4)',
|
||||
@ -2180,6 +2425,23 @@
|
||||
amoprighttype => 'macaddr', amopstrategy => '5',
|
||||
amopopr => '>(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
|
||||
# minmax multi macaddr
|
||||
{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '1',
|
||||
amopopr => '<(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '2',
|
||||
amopopr => '<=(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '3',
|
||||
amopopr => '=(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '4',
|
||||
amopopr => '>=(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '5',
|
||||
amopopr => '>(macaddr,macaddr)', amopmethod => 'brin' },
|
||||
|
||||
# bloom macaddr
|
||||
{ amopfamily => 'brin/macaddr_bloom_ops', amoplefttype => 'macaddr',
|
||||
amoprighttype => 'macaddr', amopstrategy => '1',
|
||||
@ -2202,6 +2464,23 @@
|
||||
amoprighttype => 'macaddr8', amopstrategy => '5',
|
||||
amopopr => '>(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
|
||||
# minmax multi macaddr8
|
||||
{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '1',
|
||||
amopopr => '<(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '2',
|
||||
amopopr => '<=(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '3',
|
||||
amopopr => '=(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '4',
|
||||
amopopr => '>=(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '5',
|
||||
amopopr => '>(macaddr8,macaddr8)', amopmethod => 'brin' },
|
||||
|
||||
# bloom macaddr8
|
||||
{ amopfamily => 'brin/macaddr8_bloom_ops', amoplefttype => 'macaddr8',
|
||||
amoprighttype => 'macaddr8', amopstrategy => '1',
|
||||
@ -2224,6 +2503,23 @@
|
||||
amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi inet
|
||||
{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '1', amopopr => '<(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '2', amopopr => '<=(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '3', amopopr => '=(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '4', amopopr => '>=(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom inet
|
||||
{ amopfamily => 'brin/network_bloom_ops', amoplefttype => 'inet',
|
||||
amoprighttype => 'inet', amopstrategy => '1', amopopr => '=(inet,inet)',
|
||||
@ -2288,6 +2584,23 @@
|
||||
amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi time without time zone
|
||||
{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '1', amopopr => '<(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '2', amopopr => '<=(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '3', amopopr => '=(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '4', amopopr => '>=(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom time without time zone
|
||||
{ amopfamily => 'brin/time_bloom_ops', amoplefttype => 'time',
|
||||
amoprighttype => 'time', amopstrategy => '1', amopopr => '=(time,time)',
|
||||
@ -2439,6 +2752,152 @@
|
||||
amoprighttype => 'timestamptz', amopstrategy => '5',
|
||||
amopopr => '>(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
|
||||
# minmax multi datetime (date, timestamp, timestamptz)
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamp', amopstrategy => '1',
|
||||
amopopr => '<(timestamp,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamp', amopstrategy => '2',
|
||||
amopopr => '<=(timestamp,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamp', amopstrategy => '3',
|
||||
amopopr => '=(timestamp,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamp', amopstrategy => '4',
|
||||
amopopr => '>=(timestamp,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamp', amopstrategy => '5',
|
||||
amopopr => '>(timestamp,timestamp)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'date', amopstrategy => '1', amopopr => '<(timestamp,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(timestamp,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'date', amopstrategy => '3', amopopr => '=(timestamp,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(timestamp,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'date', amopstrategy => '5', amopopr => '>(timestamp,date)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '1',
|
||||
amopopr => '<(timestamp,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '2',
|
||||
amopopr => '<=(timestamp,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '3',
|
||||
amopopr => '=(timestamp,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '4',
|
||||
amopopr => '>=(timestamp,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '5',
|
||||
amopopr => '>(timestamp,timestamptz)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'date', amopstrategy => '1', amopopr => '<(date,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(date,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'date', amopstrategy => '3', amopopr => '=(date,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(date,date)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'date', amopstrategy => '5', amopopr => '>(date,date)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamp', amopstrategy => '1',
|
||||
amopopr => '<(date,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamp', amopstrategy => '2',
|
||||
amopopr => '<=(date,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamp', amopstrategy => '3',
|
||||
amopopr => '=(date,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamp', amopstrategy => '4',
|
||||
amopopr => '>=(date,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamp', amopstrategy => '5',
|
||||
amopopr => '>(date,timestamp)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '1',
|
||||
amopopr => '<(date,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '2',
|
||||
amopopr => '<=(date,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '3',
|
||||
amopopr => '=(date,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '4',
|
||||
amopopr => '>=(date,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '5',
|
||||
amopopr => '>(date,timestamptz)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'date', amopstrategy => '1',
|
||||
amopopr => '<(timestamptz,date)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'date', amopstrategy => '2',
|
||||
amopopr => '<=(timestamptz,date)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'date', amopstrategy => '3',
|
||||
amopopr => '=(timestamptz,date)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'date', amopstrategy => '4',
|
||||
amopopr => '>=(timestamptz,date)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'date', amopstrategy => '5',
|
||||
amopopr => '>(timestamptz,date)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamp', amopstrategy => '1',
|
||||
amopopr => '<(timestamptz,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamp', amopstrategy => '2',
|
||||
amopopr => '<=(timestamptz,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamp', amopstrategy => '3',
|
||||
amopopr => '=(timestamptz,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamp', amopstrategy => '4',
|
||||
amopopr => '>=(timestamptz,timestamp)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamp', amopstrategy => '5',
|
||||
amopopr => '>(timestamptz,timestamp)', amopmethod => 'brin' },
|
||||
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '1',
|
||||
amopopr => '<(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '2',
|
||||
amopopr => '<=(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '3',
|
||||
amopopr => '=(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '4',
|
||||
amopopr => '>=(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz',
|
||||
amoprighttype => 'timestamptz', amopstrategy => '5',
|
||||
amopopr => '>(timestamptz,timestamptz)', amopmethod => 'brin' },
|
||||
|
||||
# bloom datetime (date, timestamp, timestamptz)
|
||||
|
||||
{ amopfamily => 'brin/datetime_bloom_ops', amoplefttype => 'timestamp',
|
||||
@ -2470,6 +2929,23 @@
|
||||
amoprighttype => 'interval', amopstrategy => '5',
|
||||
amopopr => '>(interval,interval)', amopmethod => 'brin' },
|
||||
|
||||
# minmax multi interval
|
||||
{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '1',
|
||||
amopopr => '<(interval,interval)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '2',
|
||||
amopopr => '<=(interval,interval)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '3',
|
||||
amopopr => '=(interval,interval)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '4',
|
||||
amopopr => '>=(interval,interval)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '5',
|
||||
amopopr => '>(interval,interval)', amopmethod => 'brin' },
|
||||
|
||||
# bloom interval
|
||||
{ amopfamily => 'brin/interval_bloom_ops', amoplefttype => 'interval',
|
||||
amoprighttype => 'interval', amopstrategy => '1',
|
||||
@ -2492,6 +2968,23 @@
|
||||
amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi time with time zone
|
||||
{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '1', amopopr => '<(timetz,timetz)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '2',
|
||||
amopopr => '<=(timetz,timetz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '3', amopopr => '=(timetz,timetz)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '4',
|
||||
amopopr => '>=(timetz,timetz)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom time with time zone
|
||||
{ amopfamily => 'brin/timetz_bloom_ops', amoplefttype => 'timetz',
|
||||
amoprighttype => 'timetz', amopstrategy => '1', amopopr => '=(timetz,timetz)',
|
||||
@ -2548,6 +3041,23 @@
|
||||
amoprighttype => 'numeric', amopstrategy => '5',
|
||||
amopopr => '>(numeric,numeric)', amopmethod => 'brin' },
|
||||
|
||||
# minmax multi numeric
|
||||
{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '1',
|
||||
amopopr => '<(numeric,numeric)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '2',
|
||||
amopopr => '<=(numeric,numeric)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '3',
|
||||
amopopr => '=(numeric,numeric)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '4',
|
||||
amopopr => '>=(numeric,numeric)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '5',
|
||||
amopopr => '>(numeric,numeric)', amopmethod => 'brin' },
|
||||
|
||||
# bloom numeric
|
||||
{ amopfamily => 'brin/numeric_bloom_ops', amoplefttype => 'numeric',
|
||||
amoprighttype => 'numeric', amopstrategy => '1',
|
||||
@ -2570,6 +3080,23 @@
|
||||
amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi uuid
|
||||
{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '1', amopopr => '<(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '2', amopopr => '<=(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '3', amopopr => '=(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '4', amopopr => '>=(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom uuid
|
||||
{ amopfamily => 'brin/uuid_bloom_ops', amoplefttype => 'uuid',
|
||||
amoprighttype => 'uuid', amopstrategy => '1', amopopr => '=(uuid,uuid)',
|
||||
@ -2636,6 +3163,23 @@
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# minmax multi pg_lsn
|
||||
{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '<(pg_lsn,pg_lsn)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '2',
|
||||
amopopr => '<=(pg_lsn,pg_lsn)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '3', amopopr => '=(pg_lsn,pg_lsn)',
|
||||
amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '4',
|
||||
amopopr => '>=(pg_lsn,pg_lsn)', amopmethod => 'brin' },
|
||||
{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# bloom pg_lsn
|
||||
{ amopfamily => 'brin/pg_lsn_bloom_ops', amoplefttype => 'pg_lsn',
|
||||
amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '=(pg_lsn,pg_lsn)',
|
||||
|
@ -922,6 +922,58 @@
|
||||
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi integer: int2, int4, int8
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2',
|
||||
amprocrighttype => 'int2', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int2' },
|
||||
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4',
|
||||
amprocrighttype => 'int4', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int4' },
|
||||
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int8' },
|
||||
|
||||
# bloom integer: int2, int4, int8
|
||||
{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8',
|
||||
amprocrighttype => 'int8', amprocnum => '1',
|
||||
@ -1017,6 +1069,23 @@
|
||||
{ amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi oid
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int4' },
|
||||
|
||||
# bloom oid
|
||||
{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid',
|
||||
amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_bloom_opcinfo' },
|
||||
@ -1063,6 +1132,23 @@
|
||||
{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '11', amproc => 'hashtid' },
|
||||
|
||||
# minmax multi tid
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid',
|
||||
amprocrighttype => 'tid', amprocnum => '11', amproc => 'brin_minmax_multi_distance_tid' },
|
||||
|
||||
# minmax float
|
||||
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '1',
|
||||
@ -1090,6 +1176,45 @@
|
||||
amprocrighttype => 'float8', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi float
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_float4' },
|
||||
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8',
|
||||
amprocrighttype => 'float8', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_float8' },
|
||||
|
||||
# bloom float
|
||||
{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4',
|
||||
amprocrighttype => 'float4', amprocnum => '1',
|
||||
@ -1143,6 +1268,26 @@
|
||||
amprocrighttype => 'macaddr', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi macaddr
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_macaddr' },
|
||||
|
||||
# bloom macaddr
|
||||
{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr',
|
||||
amprocrighttype => 'macaddr', amprocnum => '1',
|
||||
@ -1177,6 +1322,26 @@
|
||||
amprocrighttype => 'macaddr8', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi macaddr8
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_macaddr8' },
|
||||
|
||||
# bloom macaddr8
|
||||
{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8',
|
||||
amprocrighttype => 'macaddr8', amprocnum => '1',
|
||||
@ -1210,6 +1375,26 @@
|
||||
{ amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi inet
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_inet' },
|
||||
|
||||
# bloom inet
|
||||
{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet',
|
||||
amprocrighttype => 'inet', amprocnum => '1',
|
||||
@ -1295,6 +1480,25 @@
|
||||
{ amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi time without time zone
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_time' },
|
||||
|
||||
# bloom time without time zone
|
||||
{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time',
|
||||
amprocrighttype => 'time', amprocnum => '1',
|
||||
@ -1352,6 +1556,64 @@
|
||||
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi datetime (date, timestamp, timestamptz)
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_timestamp' },
|
||||
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz',
|
||||
amprocrighttype => 'timestamptz', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_timestamp' },
|
||||
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date',
|
||||
amprocrighttype => 'date', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_date' },
|
||||
|
||||
# bloom datetime (date, timestamp, timestamptz)
|
||||
{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp',
|
||||
amprocrighttype => 'timestamp', amprocnum => '1',
|
||||
@ -1422,6 +1684,26 @@
|
||||
amprocrighttype => 'interval', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi interval
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_interval' },
|
||||
|
||||
# bloom interval
|
||||
{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval',
|
||||
amprocrighttype => 'interval', amprocnum => '1',
|
||||
@ -1456,6 +1738,26 @@
|
||||
amprocrighttype => 'timetz', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi time with time zone
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_timetz' },
|
||||
|
||||
# bloom time with time zone
|
||||
{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz',
|
||||
amprocrighttype => 'timetz', amprocnum => '1',
|
||||
@ -1516,6 +1818,26 @@
|
||||
amprocrighttype => 'numeric', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi numeric
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_numeric' },
|
||||
|
||||
# bloom numeric
|
||||
{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric',
|
||||
amprocrighttype => 'numeric', amprocnum => '1',
|
||||
@ -1549,6 +1871,26 @@
|
||||
{ amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '4', amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi uuid
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_uuid' },
|
||||
|
||||
# bloom uuid
|
||||
{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid',
|
||||
amprocrighttype => 'uuid', amprocnum => '1',
|
||||
@ -1604,6 +1946,26 @@
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '4',
|
||||
amproc => 'brin_minmax_union' },
|
||||
|
||||
# minmax multi pg_lsn
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '1',
|
||||
amproc => 'brin_minmax_multi_opcinfo' },
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '2',
|
||||
amproc => 'brin_minmax_multi_add_value' },
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '3',
|
||||
amproc => 'brin_minmax_multi_consistent' },
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '4',
|
||||
amproc => 'brin_minmax_multi_union' },
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '5',
|
||||
amproc => 'brin_minmax_multi_options' },
|
||||
{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '11',
|
||||
amproc => 'brin_minmax_multi_distance_pg_lsn' },
|
||||
|
||||
# bloom pg_lsn
|
||||
{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn',
|
||||
amprocrighttype => 'pg_lsn', amprocnum => '1',
|
||||
|
@ -284,18 +284,27 @@
|
||||
{ opcmethod => 'brin', opcname => 'int8_minmax_ops',
|
||||
opcfamily => 'brin/integer_minmax_ops', opcintype => 'int8',
|
||||
opckeytype => 'int8' },
|
||||
{ opcmethod => 'brin', opcname => 'int8_minmax_multi_ops',
|
||||
opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int8',
|
||||
opckeytype => 'int8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'int8_bloom_ops',
|
||||
opcfamily => 'brin/integer_bloom_ops', opcintype => 'int8',
|
||||
opckeytype => 'int8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'int2_minmax_ops',
|
||||
opcfamily => 'brin/integer_minmax_ops', opcintype => 'int2',
|
||||
opckeytype => 'int2' },
|
||||
{ opcmethod => 'brin', opcname => 'int2_minmax_multi_ops',
|
||||
opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int2',
|
||||
opckeytype => 'int2', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'int2_bloom_ops',
|
||||
opcfamily => 'brin/integer_bloom_ops', opcintype => 'int2',
|
||||
opckeytype => 'int2', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'int4_minmax_ops',
|
||||
opcfamily => 'brin/integer_minmax_ops', opcintype => 'int4',
|
||||
opckeytype => 'int4' },
|
||||
{ opcmethod => 'brin', opcname => 'int4_minmax_multi_ops',
|
||||
opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int4',
|
||||
opckeytype => 'int4', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'int4_bloom_ops',
|
||||
opcfamily => 'brin/integer_bloom_ops', opcintype => 'int4',
|
||||
opckeytype => 'int4', opcdefault => 'f' },
|
||||
@ -307,6 +316,9 @@
|
||||
opckeytype => 'text', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'oid_minmax_ops',
|
||||
opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid' },
|
||||
{ opcmethod => 'brin', opcname => 'oid_minmax_multi_ops',
|
||||
opcfamily => 'brin/oid_minmax_multi_ops', opcintype => 'oid',
|
||||
opckeytype => 'oid', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'oid_bloom_ops',
|
||||
opcfamily => 'brin/oid_bloom_ops', opcintype => 'oid',
|
||||
opckeytype => 'oid', opcdefault => 'f' },
|
||||
@ -315,33 +327,51 @@
|
||||
{ opcmethod => 'brin', opcname => 'tid_bloom_ops',
|
||||
opcfamily => 'brin/tid_bloom_ops', opcintype => 'tid', opckeytype => 'tid',
|
||||
opcdefault => 'f'},
|
||||
{ opcmethod => 'brin', opcname => 'tid_minmax_multi_ops',
|
||||
opcfamily => 'brin/tid_minmax_multi_ops', opcintype => 'tid',
|
||||
opckeytype => 'tid', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'float4_minmax_ops',
|
||||
opcfamily => 'brin/float_minmax_ops', opcintype => 'float4',
|
||||
opckeytype => 'float4' },
|
||||
{ opcmethod => 'brin', opcname => 'float4_minmax_multi_ops',
|
||||
opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float4',
|
||||
opckeytype => 'float4', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'float4_bloom_ops',
|
||||
opcfamily => 'brin/float_bloom_ops', opcintype => 'float4',
|
||||
opckeytype => 'float4', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'float8_minmax_ops',
|
||||
opcfamily => 'brin/float_minmax_ops', opcintype => 'float8',
|
||||
opckeytype => 'float8' },
|
||||
{ opcmethod => 'brin', opcname => 'float8_minmax_multi_ops',
|
||||
opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float8',
|
||||
opckeytype => 'float8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'float8_bloom_ops',
|
||||
opcfamily => 'brin/float_bloom_ops', opcintype => 'float8',
|
||||
opckeytype => 'float8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr_minmax_ops',
|
||||
opcfamily => 'brin/macaddr_minmax_ops', opcintype => 'macaddr',
|
||||
opckeytype => 'macaddr' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr_minmax_multi_ops',
|
||||
opcfamily => 'brin/macaddr_minmax_multi_ops', opcintype => 'macaddr',
|
||||
opckeytype => 'macaddr', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr_bloom_ops',
|
||||
opcfamily => 'brin/macaddr_bloom_ops', opcintype => 'macaddr',
|
||||
opckeytype => 'macaddr', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr8_minmax_ops',
|
||||
opcfamily => 'brin/macaddr8_minmax_ops', opcintype => 'macaddr8',
|
||||
opckeytype => 'macaddr8' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr8_minmax_multi_ops',
|
||||
opcfamily => 'brin/macaddr8_minmax_multi_ops', opcintype => 'macaddr8',
|
||||
opckeytype => 'macaddr8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'macaddr8_bloom_ops',
|
||||
opcfamily => 'brin/macaddr8_bloom_ops', opcintype => 'macaddr8',
|
||||
opckeytype => 'macaddr8', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'inet_minmax_ops',
|
||||
opcfamily => 'brin/network_minmax_ops', opcintype => 'inet',
|
||||
opcdefault => 'f', opckeytype => 'inet' },
|
||||
{ opcmethod => 'brin', opcname => 'inet_minmax_multi_ops',
|
||||
opcfamily => 'brin/network_minmax_multi_ops', opcintype => 'inet',
|
||||
opcdefault => 'f', opckeytype => 'inet', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'inet_bloom_ops',
|
||||
opcfamily => 'brin/network_bloom_ops', opcintype => 'inet',
|
||||
opcdefault => 'f', opckeytype => 'inet', opcdefault => 'f' },
|
||||
@ -357,36 +387,54 @@
|
||||
{ opcmethod => 'brin', opcname => 'time_minmax_ops',
|
||||
opcfamily => 'brin/time_minmax_ops', opcintype => 'time',
|
||||
opckeytype => 'time' },
|
||||
{ opcmethod => 'brin', opcname => 'time_minmax_multi_ops',
|
||||
opcfamily => 'brin/time_minmax_multi_ops', opcintype => 'time',
|
||||
opckeytype => 'time', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'time_bloom_ops',
|
||||
opcfamily => 'brin/time_bloom_ops', opcintype => 'time',
|
||||
opckeytype => 'time', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'date_minmax_ops',
|
||||
opcfamily => 'brin/datetime_minmax_ops', opcintype => 'date',
|
||||
opckeytype => 'date' },
|
||||
{ opcmethod => 'brin', opcname => 'date_minmax_multi_ops',
|
||||
opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'date',
|
||||
opckeytype => 'date', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'date_bloom_ops',
|
||||
opcfamily => 'brin/datetime_bloom_ops', opcintype => 'date',
|
||||
opckeytype => 'date', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamp_minmax_ops',
|
||||
opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamp',
|
||||
opckeytype => 'timestamp' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamp_minmax_multi_ops',
|
||||
opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamp',
|
||||
opckeytype => 'timestamp', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamp_bloom_ops',
|
||||
opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamp',
|
||||
opckeytype => 'timestamp', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamptz_minmax_ops',
|
||||
opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamptz',
|
||||
opckeytype => 'timestamptz' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamptz_minmax_multi_ops',
|
||||
opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamptz',
|
||||
opckeytype => 'timestamptz', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timestamptz_bloom_ops',
|
||||
opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamptz',
|
||||
opckeytype => 'timestamptz', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'interval_minmax_ops',
|
||||
opcfamily => 'brin/interval_minmax_ops', opcintype => 'interval',
|
||||
opckeytype => 'interval' },
|
||||
{ opcmethod => 'brin', opcname => 'interval_minmax_multi_ops',
|
||||
opcfamily => 'brin/interval_minmax_multi_ops', opcintype => 'interval',
|
||||
opckeytype => 'interval', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'interval_bloom_ops',
|
||||
opcfamily => 'brin/interval_bloom_ops', opcintype => 'interval',
|
||||
opckeytype => 'interval', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timetz_minmax_ops',
|
||||
opcfamily => 'brin/timetz_minmax_ops', opcintype => 'timetz',
|
||||
opckeytype => 'timetz' },
|
||||
{ opcmethod => 'brin', opcname => 'timetz_minmax_multi_ops',
|
||||
opcfamily => 'brin/timetz_minmax_multi_ops', opcintype => 'timetz',
|
||||
opckeytype => 'timetz', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'timetz_bloom_ops',
|
||||
opcfamily => 'brin/timetz_bloom_ops', opcintype => 'timetz',
|
||||
opckeytype => 'timetz', opcdefault => 'f' },
|
||||
@ -398,6 +446,9 @@
|
||||
{ opcmethod => 'brin', opcname => 'numeric_minmax_ops',
|
||||
opcfamily => 'brin/numeric_minmax_ops', opcintype => 'numeric',
|
||||
opckeytype => 'numeric' },
|
||||
{ opcmethod => 'brin', opcname => 'numeric_minmax_multi_ops',
|
||||
opcfamily => 'brin/numeric_minmax_multi_ops', opcintype => 'numeric',
|
||||
opckeytype => 'numeric', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'numeric_bloom_ops',
|
||||
opcfamily => 'brin/numeric_bloom_ops', opcintype => 'numeric',
|
||||
opckeytype => 'numeric', opcdefault => 'f' },
|
||||
@ -407,6 +458,9 @@
|
||||
{ opcmethod => 'brin', opcname => 'uuid_minmax_ops',
|
||||
opcfamily => 'brin/uuid_minmax_ops', opcintype => 'uuid',
|
||||
opckeytype => 'uuid' },
|
||||
{ opcmethod => 'brin', opcname => 'uuid_minmax_multi_ops',
|
||||
opcfamily => 'brin/uuid_minmax_multi_ops', opcintype => 'uuid',
|
||||
opckeytype => 'uuid', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'uuid_bloom_ops',
|
||||
opcfamily => 'brin/uuid_bloom_ops', opcintype => 'uuid',
|
||||
opckeytype => 'uuid', opcdefault => 'f' },
|
||||
@ -416,6 +470,9 @@
|
||||
{ opcmethod => 'brin', opcname => 'pg_lsn_minmax_ops',
|
||||
opcfamily => 'brin/pg_lsn_minmax_ops', opcintype => 'pg_lsn',
|
||||
opckeytype => 'pg_lsn' },
|
||||
{ opcmethod => 'brin', opcname => 'pg_lsn_minmax_multi_ops',
|
||||
opcfamily => 'brin/pg_lsn_minmax_multi_ops', opcintype => 'pg_lsn',
|
||||
opckeytype => 'pg_lsn', opcdefault => 'f' },
|
||||
{ opcmethod => 'brin', opcname => 'pg_lsn_bloom_ops',
|
||||
opcfamily => 'brin/pg_lsn_bloom_ops', opcintype => 'pg_lsn',
|
||||
opckeytype => 'pg_lsn', opcdefault => 'f' },
|
||||
|
@ -182,10 +182,14 @@
|
||||
opfmethod => 'gin', opfname => 'jsonb_path_ops' },
|
||||
{ oid => '4054',
|
||||
opfmethod => 'brin', opfname => 'integer_minmax_ops' },
|
||||
{ oid => '4602',
|
||||
opfmethod => 'brin', opfname => 'integer_minmax_multi_ops' },
|
||||
{ oid => '4572',
|
||||
opfmethod => 'brin', opfname => 'integer_bloom_ops' },
|
||||
{ oid => '4055',
|
||||
opfmethod => 'brin', opfname => 'numeric_minmax_ops' },
|
||||
{ oid => '4603',
|
||||
opfmethod => 'brin', opfname => 'numeric_minmax_multi_ops' },
|
||||
{ oid => '4056',
|
||||
opfmethod => 'brin', opfname => 'text_minmax_ops' },
|
||||
{ oid => '4573',
|
||||
@ -194,10 +198,14 @@
|
||||
opfmethod => 'brin', opfname => 'numeric_bloom_ops' },
|
||||
{ oid => '4058',
|
||||
opfmethod => 'brin', opfname => 'timetz_minmax_ops' },
|
||||
{ oid => '4604',
|
||||
opfmethod => 'brin', opfname => 'timetz_minmax_multi_ops' },
|
||||
{ oid => '4575',
|
||||
opfmethod => 'brin', opfname => 'timetz_bloom_ops' },
|
||||
{ oid => '4059',
|
||||
opfmethod => 'brin', opfname => 'datetime_minmax_ops' },
|
||||
{ oid => '4605',
|
||||
opfmethod => 'brin', opfname => 'datetime_minmax_multi_ops' },
|
||||
{ oid => '4576',
|
||||
opfmethod => 'brin', opfname => 'datetime_bloom_ops' },
|
||||
{ oid => '4062',
|
||||
@ -214,26 +222,38 @@
|
||||
opfmethod => 'brin', opfname => 'name_bloom_ops' },
|
||||
{ oid => '4068',
|
||||
opfmethod => 'brin', opfname => 'oid_minmax_ops' },
|
||||
{ oid => '4606',
|
||||
opfmethod => 'brin', opfname => 'oid_minmax_multi_ops' },
|
||||
{ oid => '4580',
|
||||
opfmethod => 'brin', opfname => 'oid_bloom_ops' },
|
||||
{ oid => '4069',
|
||||
opfmethod => 'brin', opfname => 'tid_minmax_ops' },
|
||||
{ oid => '4581',
|
||||
opfmethod => 'brin', opfname => 'tid_bloom_ops' },
|
||||
{ oid => '4607',
|
||||
opfmethod => 'brin', opfname => 'tid_minmax_multi_ops' },
|
||||
{ oid => '4070',
|
||||
opfmethod => 'brin', opfname => 'float_minmax_ops' },
|
||||
{ oid => '4608',
|
||||
opfmethod => 'brin', opfname => 'float_minmax_multi_ops' },
|
||||
{ oid => '4582',
|
||||
opfmethod => 'brin', opfname => 'float_bloom_ops' },
|
||||
{ oid => '4074',
|
||||
opfmethod => 'brin', opfname => 'macaddr_minmax_ops' },
|
||||
{ oid => '4609',
|
||||
opfmethod => 'brin', opfname => 'macaddr_minmax_multi_ops' },
|
||||
{ oid => '4583',
|
||||
opfmethod => 'brin', opfname => 'macaddr_bloom_ops' },
|
||||
{ oid => '4109',
|
||||
opfmethod => 'brin', opfname => 'macaddr8_minmax_ops' },
|
||||
{ oid => '4610',
|
||||
opfmethod => 'brin', opfname => 'macaddr8_minmax_multi_ops' },
|
||||
{ oid => '4584',
|
||||
opfmethod => 'brin', opfname => 'macaddr8_bloom_ops' },
|
||||
{ oid => '4075',
|
||||
opfmethod => 'brin', opfname => 'network_minmax_ops' },
|
||||
{ oid => '4611',
|
||||
opfmethod => 'brin', opfname => 'network_minmax_multi_ops' },
|
||||
{ oid => '4102',
|
||||
opfmethod => 'brin', opfname => 'network_inclusion_ops' },
|
||||
{ oid => '4585',
|
||||
@ -244,10 +264,14 @@
|
||||
opfmethod => 'brin', opfname => 'bpchar_bloom_ops' },
|
||||
{ oid => '4077',
|
||||
opfmethod => 'brin', opfname => 'time_minmax_ops' },
|
||||
{ oid => '4612',
|
||||
opfmethod => 'brin', opfname => 'time_minmax_multi_ops' },
|
||||
{ oid => '4587',
|
||||
opfmethod => 'brin', opfname => 'time_bloom_ops' },
|
||||
{ oid => '4078',
|
||||
opfmethod => 'brin', opfname => 'interval_minmax_ops' },
|
||||
{ oid => '4613',
|
||||
opfmethod => 'brin', opfname => 'interval_minmax_multi_ops' },
|
||||
{ oid => '4588',
|
||||
opfmethod => 'brin', opfname => 'interval_bloom_ops' },
|
||||
{ oid => '4079',
|
||||
@ -256,12 +280,16 @@
|
||||
opfmethod => 'brin', opfname => 'varbit_minmax_ops' },
|
||||
{ oid => '4081',
|
||||
opfmethod => 'brin', opfname => 'uuid_minmax_ops' },
|
||||
{ oid => '4614',
|
||||
opfmethod => 'brin', opfname => 'uuid_minmax_multi_ops' },
|
||||
{ oid => '4589',
|
||||
opfmethod => 'brin', opfname => 'uuid_bloom_ops' },
|
||||
{ oid => '4103',
|
||||
opfmethod => 'brin', opfname => 'range_inclusion_ops' },
|
||||
{ oid => '4082',
|
||||
opfmethod => 'brin', opfname => 'pg_lsn_minmax_ops' },
|
||||
{ oid => '4615',
|
||||
opfmethod => 'brin', opfname => 'pg_lsn_minmax_multi_ops' },
|
||||
{ oid => '4590',
|
||||
opfmethod => 'brin', opfname => 'pg_lsn_bloom_ops' },
|
||||
{ oid => '4104',
|
||||
|
@ -8238,6 +8238,77 @@
|
||||
proname => 'brin_minmax_union', prorettype => 'bool',
|
||||
proargtypes => 'internal internal internal', prosrc => 'brin_minmax_union' },
|
||||
|
||||
# BRIN minmax multi
|
||||
{ oid => '4616', descr => 'BRIN multi minmax support',
|
||||
proname => 'brin_minmax_multi_opcinfo', prorettype => 'internal',
|
||||
proargtypes => 'internal', prosrc => 'brin_minmax_multi_opcinfo' },
|
||||
{ oid => '4617', descr => 'BRIN multi minmax support',
|
||||
proname => 'brin_minmax_multi_add_value', prorettype => 'bool',
|
||||
proargtypes => 'internal internal internal internal',
|
||||
prosrc => 'brin_minmax_multi_add_value' },
|
||||
{ oid => '4618', descr => 'BRIN multi minmax support',
|
||||
proname => 'brin_minmax_multi_consistent', prorettype => 'bool',
|
||||
proargtypes => 'internal internal internal int4',
|
||||
prosrc => 'brin_minmax_multi_consistent' },
|
||||
{ oid => '4619', descr => 'BRIN multi minmax support',
|
||||
proname => 'brin_minmax_multi_union', prorettype => 'bool',
|
||||
proargtypes => 'internal internal internal', prosrc => 'brin_minmax_multi_union' },
|
||||
{ oid => '4620', descr => 'BRIN multi minmax support',
|
||||
proname => 'brin_minmax_multi_options', prorettype => 'void', proisstrict => 'f',
|
||||
proargtypes => 'internal', prosrc => 'brin_minmax_multi_options' },
|
||||
|
||||
{ oid => '4621', descr => 'BRIN multi minmax int2 distance',
|
||||
proname => 'brin_minmax_multi_distance_int2', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int2' },
|
||||
{ oid => '4622', descr => 'BRIN multi minmax int4 distance',
|
||||
proname => 'brin_minmax_multi_distance_int4', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int4' },
|
||||
{ oid => '4623', descr => 'BRIN multi minmax int8 distance',
|
||||
proname => 'brin_minmax_multi_distance_int8', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int8' },
|
||||
{ oid => '4624', descr => 'BRIN multi minmax float4 distance',
|
||||
proname => 'brin_minmax_multi_distance_float4', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_float4' },
|
||||
{ oid => '4625', descr => 'BRIN multi minmax float8 distance',
|
||||
proname => 'brin_minmax_multi_distance_float8', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_float8' },
|
||||
{ oid => '4626', descr => 'BRIN multi minmax numeric distance',
|
||||
proname => 'brin_minmax_multi_distance_numeric', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_numeric' },
|
||||
{ oid => '4627', descr => 'BRIN multi minmax tid distance',
|
||||
proname => 'brin_minmax_multi_distance_tid', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_tid' },
|
||||
{ oid => '4628', descr => 'BRIN multi minmax uuid distance',
|
||||
proname => 'brin_minmax_multi_distance_uuid', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_uuid' },
|
||||
{ oid => '4629', descr => 'BRIN multi minmax date distance',
|
||||
proname => 'brin_minmax_multi_distance_date', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_date' },
|
||||
{ oid => '4630', descr => 'BRIN multi minmax time distance',
|
||||
proname => 'brin_minmax_multi_distance_time', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_time' },
|
||||
{ oid => '4631', descr => 'BRIN multi minmax interval distance',
|
||||
proname => 'brin_minmax_multi_distance_interval', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_interval' },
|
||||
{ oid => '4632', descr => 'BRIN multi minmax timetz distance',
|
||||
proname => 'brin_minmax_multi_distance_timetz', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_timetz' },
|
||||
{ oid => '4633', descr => 'BRIN multi minmax pg_lsn distance',
|
||||
proname => 'brin_minmax_multi_distance_pg_lsn', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_pg_lsn' },
|
||||
{ oid => '4634', descr => 'BRIN multi minmax macaddr distance',
|
||||
proname => 'brin_minmax_multi_distance_macaddr', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_macaddr' },
|
||||
{ oid => '4635', descr => 'BRIN multi minmax macaddr8 distance',
|
||||
proname => 'brin_minmax_multi_distance_macaddr8', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_macaddr8' },
|
||||
{ oid => '4636', descr => 'BRIN multi minmax inet distance',
|
||||
proname => 'brin_minmax_multi_distance_inet', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_inet' },
|
||||
{ oid => '4637', descr => 'BRIN multi minmax timestamp distance',
|
||||
proname => 'brin_minmax_multi_distance_timestamp', prorettype => 'float8',
|
||||
proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_timestamp' },
|
||||
|
||||
# BRIN inclusion
|
||||
{ oid => '4105', descr => 'BRIN inclusion support',
|
||||
proname => 'brin_inclusion_opcinfo', prorettype => 'internal',
|
||||
@ -11462,4 +11533,18 @@
|
||||
proname => 'brin_bloom_summary_send', provolatile => 's', prorettype => 'bytea',
|
||||
proargtypes => 'pg_brin_bloom_summary', prosrc => 'brin_bloom_summary_send' },
|
||||
|
||||
{ oid => '4638', descr => 'I/O',
|
||||
proname => 'brin_minmax_multi_summary_in', prorettype => 'pg_brin_minmax_multi_summary',
|
||||
proargtypes => 'cstring', prosrc => 'brin_minmax_multi_summary_in' },
|
||||
{ oid => '4639', descr => 'I/O',
|
||||
proname => 'brin_minmax_multi_summary_out', prorettype => 'cstring',
|
||||
proargtypes => 'pg_brin_minmax_multi_summary', prosrc => 'brin_minmax_multi_summary_out' },
|
||||
{ oid => '4640', descr => 'I/O',
|
||||
proname => 'brin_minmax_multi_summary_recv', provolatile => 's',
|
||||
prorettype => 'pg_brin_minmax_multi_summary', proargtypes => 'internal',
|
||||
prosrc => 'brin_minmax_multi_summary_recv' },
|
||||
{ oid => '4641', descr => 'I/O',
|
||||
proname => 'brin_minmax_multi_summary_send', provolatile => 's', prorettype => 'bytea',
|
||||
proargtypes => 'pg_brin_minmax_multi_summary', prosrc => 'brin_minmax_multi_summary_send' },
|
||||
|
||||
]
|
||||
|
@ -685,4 +685,10 @@
|
||||
typinput => 'brin_bloom_summary_in', typoutput => 'brin_bloom_summary_out',
|
||||
typreceive => 'brin_bloom_summary_recv', typsend => 'brin_bloom_summary_send',
|
||||
typalign => 'i', typstorage => 'x', typcollation => 'default' },
|
||||
{ oid => '4601',
|
||||
descr => 'BRIN minmax-multi summary',
|
||||
typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f', typcategory => 'S',
|
||||
typinput => 'brin_minmax_multi_summary_in', typoutput => 'brin_minmax_multi_summary_out',
|
||||
typreceive => 'brin_minmax_multi_summary_recv', typsend => 'brin_minmax_multi_summary_send',
|
||||
typalign => 'i', typstorage => 'x', typcollation => 'default' },
|
||||
]
|
||||
|
450
src/test/regress/expected/brin_multi.out
Normal file
450
src/test/regress/expected/brin_multi.out
Normal file
@ -0,0 +1,450 @@
|
||||
CREATE TABLE brintest_multi (
|
||||
int8col bigint,
|
||||
int2col smallint,
|
||||
int4col integer,
|
||||
oidcol oid,
|
||||
tidcol tid,
|
||||
float4col real,
|
||||
float8col double precision,
|
||||
macaddrcol macaddr,
|
||||
inetcol inet,
|
||||
cidrcol cidr,
|
||||
datecol date,
|
||||
timecol time without time zone,
|
||||
timestampcol timestamp without time zone,
|
||||
timestamptzcol timestamp with time zone,
|
||||
intervalcol interval,
|
||||
timetzcol time with time zone,
|
||||
numericcol numeric,
|
||||
uuidcol uuid,
|
||||
lsncol pg_lsn
|
||||
) WITH (fillfactor=10);
|
||||
INSERT INTO brintest_multi SELECT
|
||||
142857 * tenthous,
|
||||
thousand,
|
||||
twothousand,
|
||||
unique1::oid,
|
||||
format('(%s,%s)', tenthous, twenty)::tid,
|
||||
(four + 1.0)/(hundred+1),
|
||||
odd::float8 / (tenthous + 1),
|
||||
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
|
||||
inet '10.2.3.4/24' + tenthous,
|
||||
cidr '10.2.3/24' + tenthous,
|
||||
date '1995-08-15' + tenthous,
|
||||
time '01:20:30' + thousand * interval '18.5 second',
|
||||
timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours',
|
||||
timestamptz '1972-10-10 03:00' + thousand * interval '1 hour',
|
||||
justify_days(justify_hours(tenthous * interval '12 minutes')),
|
||||
timetz '01:30:20+02' + hundred * interval '15 seconds',
|
||||
tenthous::numeric(36,30) * fivethous * even / (hundred + 1),
|
||||
format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid,
|
||||
format('%s/%s%s', odd, even, tenthous)::pg_lsn
|
||||
FROM tenk1 ORDER BY unique2 LIMIT 100;
|
||||
-- throw in some NULL's and different values
|
||||
INSERT INTO brintest_multi (inetcol, cidrcol) SELECT
|
||||
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
|
||||
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous
|
||||
FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
|
||||
-- test minmax-multi specific index options
|
||||
-- number of values must be >= 16
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops(values_per_range = 7)
|
||||
);
|
||||
ERROR: value 7 out of bounds for option "values_per_range"
|
||||
DETAIL: Valid values are between "8" and "256".
|
||||
-- number of values must be <= 256
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops(values_per_range = 257)
|
||||
);
|
||||
ERROR: value 257 out of bounds for option "values_per_range"
|
||||
DETAIL: Valid values are between "8" and "256".
|
||||
-- first create an index with a single page range, to force compaction
|
||||
-- due to exceeding the number of values per summary
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops,
|
||||
int2col int2_minmax_multi_ops,
|
||||
int4col int4_minmax_multi_ops,
|
||||
oidcol oid_minmax_multi_ops,
|
||||
tidcol tid_minmax_multi_ops,
|
||||
float4col float4_minmax_multi_ops,
|
||||
float8col float8_minmax_multi_ops,
|
||||
macaddrcol macaddr_minmax_multi_ops,
|
||||
inetcol inet_minmax_multi_ops,
|
||||
cidrcol inet_minmax_multi_ops,
|
||||
datecol date_minmax_multi_ops,
|
||||
timecol time_minmax_multi_ops,
|
||||
timestampcol timestamp_minmax_multi_ops,
|
||||
timestamptzcol timestamptz_minmax_multi_ops,
|
||||
intervalcol interval_minmax_multi_ops,
|
||||
timetzcol timetz_minmax_multi_ops,
|
||||
numericcol numeric_minmax_multi_ops,
|
||||
uuidcol uuid_minmax_multi_ops,
|
||||
lsncol pg_lsn_minmax_multi_ops
|
||||
);
|
||||
DROP INDEX brinidx_multi;
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops,
|
||||
int2col int2_minmax_multi_ops,
|
||||
int4col int4_minmax_multi_ops,
|
||||
oidcol oid_minmax_multi_ops,
|
||||
tidcol tid_minmax_multi_ops,
|
||||
float4col float4_minmax_multi_ops,
|
||||
float8col float8_minmax_multi_ops,
|
||||
macaddrcol macaddr_minmax_multi_ops,
|
||||
inetcol inet_minmax_multi_ops,
|
||||
cidrcol inet_minmax_multi_ops,
|
||||
datecol date_minmax_multi_ops,
|
||||
timecol time_minmax_multi_ops,
|
||||
timestampcol timestamp_minmax_multi_ops,
|
||||
timestamptzcol timestamptz_minmax_multi_ops,
|
||||
intervalcol interval_minmax_multi_ops,
|
||||
timetzcol timetz_minmax_multi_ops,
|
||||
numericcol numeric_minmax_multi_ops,
|
||||
uuidcol uuid_minmax_multi_ops,
|
||||
lsncol pg_lsn_minmax_multi_ops
|
||||
) with (pages_per_range = 1);
|
||||
CREATE TABLE brinopers_multi (colname name, typ text,
|
||||
op text[], value text[], matches int[],
|
||||
check (cardinality(op) = cardinality(value)),
|
||||
check (cardinality(op) = cardinality(matches)));
|
||||
INSERT INTO brinopers_multi VALUES
|
||||
('int2col', 'int2',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int2col', 'int4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int2col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int2',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int8col', 'int2',
|
||||
'{>, >=}',
|
||||
'{0, 0}',
|
||||
'{100, 100}'),
|
||||
('int8col', 'int4',
|
||||
'{>, >=}',
|
||||
'{0, 0}',
|
||||
'{100, 100}'),
|
||||
('int8col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 1257141600, 1428427143, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('oidcol', 'oid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 8800, 9999, 9999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('tidcol', 'tid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{"(0,0)", "(0,0)", "(8800,0)", "(9999,19)", "(9999,19)"}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('float4col', 'float4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.0103093, 0.0103093, 1, 1, 1}',
|
||||
'{100, 100, 4, 100, 96}'),
|
||||
('float4col', 'float8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.0103093, 0.0103093, 1, 1, 1}',
|
||||
'{100, 100, 4, 100, 96}'),
|
||||
('float8col', 'float4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 0, 1.98, 1.98}',
|
||||
'{99, 100, 1, 100, 100}'),
|
||||
('float8col', 'float8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 0, 1.98, 1.98}',
|
||||
'{99, 100, 1, 100, 100}'),
|
||||
('macaddrcol', 'macaddr',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00:00:01:00:00:00, 00:00:01:00:00:00, 2c:00:2d:00:16:00, ff:fe:00:00:00:00, ff:fe:00:00:00:00}',
|
||||
'{99, 100, 2, 100, 100}'),
|
||||
('inetcol', 'inet',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14.231/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{1, 100, 100, 125, 125}'),
|
||||
('inetcol', 'cidr',
|
||||
'{<, <=, >, >=}',
|
||||
'{255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{100, 100, 125, 125}'),
|
||||
('cidrcol', 'inet',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{2, 100, 100, 125, 125}'),
|
||||
('cidrcol', 'cidr',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{2, 100, 100, 125, 125}'),
|
||||
('datecol', 'date',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1995-08-15, 1995-08-15, 2009-12-01, 2022-12-30, 2022-12-30}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timecol', 'time',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{01:20:30, 01:20:30, 02:28:57, 06:28:31.5, 06:28:31.5}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestampcol', 'timestamp',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1942-07-23 03:05:09, 1942-07-23 03:05:09, 1964-03-24 19:26:45, 1984-01-20 22:42:21, 1984-01-20 22:42:21}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestampcol', 'timestamptz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1942-07-23 03:05:09, 1942-07-23 03:05:09, 1964-03-24 19:26:45, 1984-01-20 22:42:21, 1984-01-20 22:42:21}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestamptzcol', 'timestamptz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1972-10-10 03:00:00-04, 1972-10-10 03:00:00-04, 1972-10-19 09:00:00-07, 1972-11-20 19:00:00-03, 1972-11-20 19:00:00-03}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('intervalcol', 'interval',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00:00:00, 00:00:00, 1 mons 13 days 12:24, 2 mons 23 days 07:48:00, 1 year}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timetzcol', 'timetz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{01:30:20+02, 01:30:20+02, 01:35:50+02, 23:55:05+02, 23:55:05+02}',
|
||||
'{99, 100, 2, 100, 100}'),
|
||||
('numericcol', 'numeric',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.00, 0.01, 2268164.347826086956521739130434782609, 99470151.9, 99470151.9}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('uuidcol', 'uuid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00040004-0004-0004-0004-000400040004, 00040004-0004-0004-0004-000400040004, 52225222-5222-5222-5222-522252225222, 99989998-9998-9998-9998-999899989998, 99989998-9998-9998-9998-999899989998}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('lsncol', 'pg_lsn',
|
||||
'{>, >=, =, <=, <, IS, IS NOT}',
|
||||
'{0/1200, 0/1200, 44/455222, 198/1999799, 198/1999799, NULL, NULL}',
|
||||
'{100, 100, 1, 100, 100, 25, 100}');
|
||||
DO $x$
|
||||
DECLARE
|
||||
r record;
|
||||
r2 record;
|
||||
cond text;
|
||||
idx_ctids tid[];
|
||||
ss_ctids tid[];
|
||||
count int;
|
||||
plan_ok bool;
|
||||
plan_line text;
|
||||
BEGIN
|
||||
FOR r IN SELECT colname, oper, typ, value[ordinality], matches[ordinality] FROM brinopers_multi, unnest(op) WITH ORDINALITY AS oper LOOP
|
||||
|
||||
-- prepare the condition
|
||||
IF r.value IS NULL THEN
|
||||
cond := format('%I %s %L', r.colname, r.oper, r.value);
|
||||
ELSE
|
||||
cond := format('%I %s %L::%s', r.colname, r.oper, r.value, r.typ);
|
||||
END IF;
|
||||
|
||||
-- run the query using the brin index
|
||||
SET enable_seqscan = 0;
|
||||
SET enable_bitmapscan = 1;
|
||||
|
||||
plan_ok := false;
|
||||
FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond) LOOP
|
||||
IF plan_line LIKE '%Bitmap Heap Scan on brintest_multi%' THEN
|
||||
plan_ok := true;
|
||||
END IF;
|
||||
END LOOP;
|
||||
IF NOT plan_ok THEN
|
||||
RAISE WARNING 'did not get bitmap indexscan plan for %', r;
|
||||
END IF;
|
||||
|
||||
EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond)
|
||||
INTO idx_ctids;
|
||||
|
||||
-- run the query using a seqscan
|
||||
SET enable_seqscan = 1;
|
||||
SET enable_bitmapscan = 0;
|
||||
|
||||
plan_ok := false;
|
||||
FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond) LOOP
|
||||
IF plan_line LIKE '%Seq Scan on brintest_multi%' THEN
|
||||
plan_ok := true;
|
||||
END IF;
|
||||
END LOOP;
|
||||
IF NOT plan_ok THEN
|
||||
RAISE WARNING 'did not get seqscan plan for %', r;
|
||||
END IF;
|
||||
|
||||
EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond)
|
||||
INTO ss_ctids;
|
||||
|
||||
-- make sure both return the same results
|
||||
count := array_length(idx_ctids, 1);
|
||||
|
||||
IF NOT (count = array_length(ss_ctids, 1) AND
|
||||
idx_ctids @> ss_ctids AND
|
||||
idx_ctids <@ ss_ctids) THEN
|
||||
-- report the results of each scan to make the differences obvious
|
||||
RAISE WARNING 'something not right in %: count %', r, count;
|
||||
SET enable_seqscan = 1;
|
||||
SET enable_bitmapscan = 0;
|
||||
FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_multi WHERE ' || cond LOOP
|
||||
RAISE NOTICE 'seqscan: %', r2;
|
||||
END LOOP;
|
||||
|
||||
SET enable_seqscan = 0;
|
||||
SET enable_bitmapscan = 1;
|
||||
FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_multi WHERE ' || cond LOOP
|
||||
RAISE NOTICE 'bitmapscan: %', r2;
|
||||
END LOOP;
|
||||
END IF;
|
||||
|
||||
-- make sure we found expected number of matches
|
||||
IF count != r.matches THEN RAISE WARNING 'unexpected number of results % for %', count, r; END IF;
|
||||
END LOOP;
|
||||
END;
|
||||
$x$;
|
||||
RESET enable_seqscan;
|
||||
RESET enable_bitmapscan;
|
||||
INSERT INTO brintest_multi SELECT
|
||||
142857 * tenthous,
|
||||
thousand,
|
||||
twothousand,
|
||||
unique1::oid,
|
||||
format('(%s,%s)', tenthous, twenty)::tid,
|
||||
(four + 1.0)/(hundred+1),
|
||||
odd::float8 / (tenthous + 1),
|
||||
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
|
||||
inet '10.2.3.4' + tenthous,
|
||||
cidr '10.2.3/24' + tenthous,
|
||||
date '1995-08-15' + tenthous,
|
||||
time '01:20:30' + thousand * interval '18.5 second',
|
||||
timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours',
|
||||
timestamptz '1972-10-10 03:00' + thousand * interval '1 hour',
|
||||
justify_days(justify_hours(tenthous * interval '12 minutes')),
|
||||
timetz '01:30:20' + hundred * interval '15 seconds',
|
||||
tenthous::numeric(36,30) * fivethous * even / (hundred + 1),
|
||||
format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid,
|
||||
format('%s/%s%s', odd, even, tenthous)::pg_lsn
|
||||
FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
brin_desummarize_range
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
VACUUM brintest_multi; -- force a summarization cycle in brinidx
|
||||
UPDATE brintest_multi SET int8col = int8col * int4col;
|
||||
-- Tests for brin_summarize_new_values
|
||||
SELECT brin_summarize_new_values('brintest_multi'); -- error, not an index
|
||||
ERROR: "brintest_multi" is not an index
|
||||
SELECT brin_summarize_new_values('tenk1_unique1'); -- error, not a BRIN index
|
||||
ERROR: "tenk1_unique1" is not a BRIN index
|
||||
SELECT brin_summarize_new_values('brinidx_multi'); -- ok, no change expected
|
||||
brin_summarize_new_values
|
||||
---------------------------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
-- Tests for brin_desummarize_range
|
||||
SELECT brin_desummarize_range('brinidx_multi', -1); -- error, invalid range
|
||||
ERROR: block number out of range: -1
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
brin_desummarize_range
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
brin_desummarize_range
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT brin_desummarize_range('brinidx_multi', 100000000);
|
||||
brin_desummarize_range
|
||||
------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
-- test building an index with many values, to force compaction of the buffer
|
||||
CREATE TABLE brin_large_range (a int4);
|
||||
INSERT INTO brin_large_range SELECT i FROM generate_series(1,10000) s(i);
|
||||
CREATE INDEX brin_large_range_idx ON brin_large_range USING brin (a int4_minmax_multi_ops);
|
||||
DROP TABLE brin_large_range;
|
||||
-- Test brin_summarize_range
|
||||
CREATE TABLE brin_summarize_multi (
|
||||
value int
|
||||
) WITH (fillfactor=10, autovacuum_enabled=false);
|
||||
CREATE INDEX brin_summarize_multi_idx ON brin_summarize_multi USING brin (value) WITH (pages_per_range=2);
|
||||
-- Fill a few pages
|
||||
DO $$
|
||||
DECLARE curtid tid;
|
||||
BEGIN
|
||||
LOOP
|
||||
INSERT INTO brin_summarize_multi VALUES (1) RETURNING ctid INTO curtid;
|
||||
EXIT WHEN curtid > tid '(2, 0)';
|
||||
END LOOP;
|
||||
END;
|
||||
$$;
|
||||
-- summarize one range
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 0);
|
||||
brin_summarize_range
|
||||
----------------------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
-- nothing: already summarized
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 1);
|
||||
brin_summarize_range
|
||||
----------------------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
-- summarize one range
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 2);
|
||||
brin_summarize_range
|
||||
----------------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
-- nothing: page doesn't exist in table
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 4294967295);
|
||||
brin_summarize_range
|
||||
----------------------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
-- invalid block number values
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', -1);
|
||||
ERROR: block number out of range: -1
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 4294967296);
|
||||
ERROR: block number out of range: 4294967296
|
||||
-- test brin cost estimates behave sanely based on correlation of values
|
||||
CREATE TABLE brin_test_multi (a INT, b INT);
|
||||
INSERT INTO brin_test_multi SELECT x/100,x%100 FROM generate_series(1,10000) x(x);
|
||||
CREATE INDEX brin_test_multi_a_idx ON brin_test_multi USING brin (a) WITH (pages_per_range = 2);
|
||||
CREATE INDEX brin_test_multi_b_idx ON brin_test_multi USING brin (b) WITH (pages_per_range = 2);
|
||||
VACUUM ANALYZE brin_test_multi;
|
||||
-- Ensure brin index is used when columns are perfectly correlated
|
||||
EXPLAIN (COSTS OFF) SELECT * FROM brin_test_multi WHERE a = 1;
|
||||
QUERY PLAN
|
||||
--------------------------------------------------
|
||||
Bitmap Heap Scan on brin_test_multi
|
||||
Recheck Cond: (a = 1)
|
||||
-> Bitmap Index Scan on brin_test_multi_a_idx
|
||||
Index Cond: (a = 1)
|
||||
(4 rows)
|
||||
|
||||
-- Ensure brin index is not used when values are not correlated
|
||||
EXPLAIN (COSTS OFF) SELECT * FROM brin_test_multi WHERE b = 1;
|
||||
QUERY PLAN
|
||||
-----------------------------
|
||||
Seq Scan on brin_test_multi
|
||||
Filter: (b = 1)
|
||||
(2 rows)
|
||||
|
@ -4990,12 +4990,13 @@ List of access methods
|
||||
(0 rows)
|
||||
|
||||
\dAc brin pg*.oid*
|
||||
List of operator classes
|
||||
AM | Input type | Storage type | Operator class | Default?
|
||||
------+------------+--------------+----------------+----------
|
||||
brin | oid | | oid_bloom_ops | no
|
||||
brin | oid | | oid_minmax_ops | yes
|
||||
(2 rows)
|
||||
List of operator classes
|
||||
AM | Input type | Storage type | Operator class | Default?
|
||||
------+------------+--------------+----------------------+----------
|
||||
brin | oid | | oid_bloom_ops | no
|
||||
brin | oid | | oid_minmax_multi_ops | no
|
||||
brin | oid | | oid_minmax_ops | yes
|
||||
(3 rows)
|
||||
|
||||
\dAf spgist
|
||||
List of operator families
|
||||
|
@ -67,14 +67,15 @@ WHERE p1.typtype not in ('p') AND p1.typname NOT LIKE E'\\_%'
|
||||
WHERE p2.typname = ('_' || p1.typname)::name AND
|
||||
p2.typelem = p1.oid and p1.typarray = p2.oid)
|
||||
ORDER BY p1.oid;
|
||||
oid | typname
|
||||
------+-----------------------
|
||||
oid | typname
|
||||
------+------------------------------
|
||||
194 | pg_node_tree
|
||||
3361 | pg_ndistinct
|
||||
3402 | pg_dependencies
|
||||
4600 | pg_brin_bloom_summary
|
||||
4601 | pg_brin_minmax_multi_summary
|
||||
5017 | pg_mcv_list
|
||||
(5 rows)
|
||||
(6 rows)
|
||||
|
||||
-- Make sure typarray points to a "true" array type of our own base
|
||||
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,
|
||||
|
@ -80,7 +80,7 @@ test: brin gin gist spgist privileges init_privs security_label collate matview
|
||||
# ----------
|
||||
# Additional BRIN tests
|
||||
# ----------
|
||||
test: brin_bloom
|
||||
test: brin_bloom brin_multi
|
||||
|
||||
# ----------
|
||||
# Another group of parallel tests
|
||||
|
@ -109,6 +109,7 @@ test: namespace
|
||||
test: prepared_xacts
|
||||
test: brin
|
||||
test: brin_bloom
|
||||
test: brin_multi
|
||||
test: gin
|
||||
test: gist
|
||||
test: spgist
|
||||
|
403
src/test/regress/sql/brin_multi.sql
Normal file
403
src/test/regress/sql/brin_multi.sql
Normal file
@ -0,0 +1,403 @@
|
||||
CREATE TABLE brintest_multi (
|
||||
int8col bigint,
|
||||
int2col smallint,
|
||||
int4col integer,
|
||||
oidcol oid,
|
||||
tidcol tid,
|
||||
float4col real,
|
||||
float8col double precision,
|
||||
macaddrcol macaddr,
|
||||
inetcol inet,
|
||||
cidrcol cidr,
|
||||
datecol date,
|
||||
timecol time without time zone,
|
||||
timestampcol timestamp without time zone,
|
||||
timestamptzcol timestamp with time zone,
|
||||
intervalcol interval,
|
||||
timetzcol time with time zone,
|
||||
numericcol numeric,
|
||||
uuidcol uuid,
|
||||
lsncol pg_lsn
|
||||
) WITH (fillfactor=10);
|
||||
|
||||
INSERT INTO brintest_multi SELECT
|
||||
142857 * tenthous,
|
||||
thousand,
|
||||
twothousand,
|
||||
unique1::oid,
|
||||
format('(%s,%s)', tenthous, twenty)::tid,
|
||||
(four + 1.0)/(hundred+1),
|
||||
odd::float8 / (tenthous + 1),
|
||||
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
|
||||
inet '10.2.3.4/24' + tenthous,
|
||||
cidr '10.2.3/24' + tenthous,
|
||||
date '1995-08-15' + tenthous,
|
||||
time '01:20:30' + thousand * interval '18.5 second',
|
||||
timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours',
|
||||
timestamptz '1972-10-10 03:00' + thousand * interval '1 hour',
|
||||
justify_days(justify_hours(tenthous * interval '12 minutes')),
|
||||
timetz '01:30:20+02' + hundred * interval '15 seconds',
|
||||
tenthous::numeric(36,30) * fivethous * even / (hundred + 1),
|
||||
format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid,
|
||||
format('%s/%s%s', odd, even, tenthous)::pg_lsn
|
||||
FROM tenk1 ORDER BY unique2 LIMIT 100;
|
||||
|
||||
-- throw in some NULL's and different values
|
||||
INSERT INTO brintest_multi (inetcol, cidrcol) SELECT
|
||||
inet 'fe80::6e40:8ff:fea9:8c46' + tenthous,
|
||||
cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous
|
||||
FROM tenk1 ORDER BY thousand, tenthous LIMIT 25;
|
||||
|
||||
-- test minmax-multi specific index options
|
||||
-- number of values must be >= 16
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops(values_per_range = 7)
|
||||
);
|
||||
-- number of values must be <= 256
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops(values_per_range = 257)
|
||||
);
|
||||
|
||||
-- first create an index with a single page range, to force compaction
|
||||
-- due to exceeding the number of values per summary
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops,
|
||||
int2col int2_minmax_multi_ops,
|
||||
int4col int4_minmax_multi_ops,
|
||||
oidcol oid_minmax_multi_ops,
|
||||
tidcol tid_minmax_multi_ops,
|
||||
float4col float4_minmax_multi_ops,
|
||||
float8col float8_minmax_multi_ops,
|
||||
macaddrcol macaddr_minmax_multi_ops,
|
||||
inetcol inet_minmax_multi_ops,
|
||||
cidrcol inet_minmax_multi_ops,
|
||||
datecol date_minmax_multi_ops,
|
||||
timecol time_minmax_multi_ops,
|
||||
timestampcol timestamp_minmax_multi_ops,
|
||||
timestamptzcol timestamptz_minmax_multi_ops,
|
||||
intervalcol interval_minmax_multi_ops,
|
||||
timetzcol timetz_minmax_multi_ops,
|
||||
numericcol numeric_minmax_multi_ops,
|
||||
uuidcol uuid_minmax_multi_ops,
|
||||
lsncol pg_lsn_minmax_multi_ops
|
||||
);
|
||||
|
||||
DROP INDEX brinidx_multi;
|
||||
|
||||
CREATE INDEX brinidx_multi ON brintest_multi USING brin (
|
||||
int8col int8_minmax_multi_ops,
|
||||
int2col int2_minmax_multi_ops,
|
||||
int4col int4_minmax_multi_ops,
|
||||
oidcol oid_minmax_multi_ops,
|
||||
tidcol tid_minmax_multi_ops,
|
||||
float4col float4_minmax_multi_ops,
|
||||
float8col float8_minmax_multi_ops,
|
||||
macaddrcol macaddr_minmax_multi_ops,
|
||||
inetcol inet_minmax_multi_ops,
|
||||
cidrcol inet_minmax_multi_ops,
|
||||
datecol date_minmax_multi_ops,
|
||||
timecol time_minmax_multi_ops,
|
||||
timestampcol timestamp_minmax_multi_ops,
|
||||
timestamptzcol timestamptz_minmax_multi_ops,
|
||||
intervalcol interval_minmax_multi_ops,
|
||||
timetzcol timetz_minmax_multi_ops,
|
||||
numericcol numeric_minmax_multi_ops,
|
||||
uuidcol uuid_minmax_multi_ops,
|
||||
lsncol pg_lsn_minmax_multi_ops
|
||||
) with (pages_per_range = 1);
|
||||
|
||||
CREATE TABLE brinopers_multi (colname name, typ text,
|
||||
op text[], value text[], matches int[],
|
||||
check (cardinality(op) = cardinality(value)),
|
||||
check (cardinality(op) = cardinality(matches)));
|
||||
|
||||
INSERT INTO brinopers_multi VALUES
|
||||
('int2col', 'int2',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int2col', 'int4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int2col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 999, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int2',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int4col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 800, 1999, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('int8col', 'int2',
|
||||
'{>, >=}',
|
||||
'{0, 0}',
|
||||
'{100, 100}'),
|
||||
('int8col', 'int4',
|
||||
'{>, >=}',
|
||||
'{0, 0}',
|
||||
'{100, 100}'),
|
||||
('int8col', 'int8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 1257141600, 1428427143, 1428427143}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('oidcol', 'oid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 8800, 9999, 9999}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('tidcol', 'tid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{"(0,0)", "(0,0)", "(8800,0)", "(9999,19)", "(9999,19)"}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('float4col', 'float4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.0103093, 0.0103093, 1, 1, 1}',
|
||||
'{100, 100, 4, 100, 96}'),
|
||||
('float4col', 'float8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.0103093, 0.0103093, 1, 1, 1}',
|
||||
'{100, 100, 4, 100, 96}'),
|
||||
('float8col', 'float4',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 0, 1.98, 1.98}',
|
||||
'{99, 100, 1, 100, 100}'),
|
||||
('float8col', 'float8',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0, 0, 0, 1.98, 1.98}',
|
||||
'{99, 100, 1, 100, 100}'),
|
||||
('macaddrcol', 'macaddr',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00:00:01:00:00:00, 00:00:01:00:00:00, 2c:00:2d:00:16:00, ff:fe:00:00:00:00, ff:fe:00:00:00:00}',
|
||||
'{99, 100, 2, 100, 100}'),
|
||||
('inetcol', 'inet',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14.231/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{1, 100, 100, 125, 125}'),
|
||||
('inetcol', 'cidr',
|
||||
'{<, <=, >, >=}',
|
||||
'{255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{100, 100, 125, 125}'),
|
||||
('cidrcol', 'inet',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{2, 100, 100, 125, 125}'),
|
||||
('cidrcol', 'cidr',
|
||||
'{=, <, <=, >, >=}',
|
||||
'{10.2.14/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
|
||||
'{2, 100, 100, 125, 125}'),
|
||||
('datecol', 'date',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1995-08-15, 1995-08-15, 2009-12-01, 2022-12-30, 2022-12-30}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timecol', 'time',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{01:20:30, 01:20:30, 02:28:57, 06:28:31.5, 06:28:31.5}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestampcol', 'timestamp',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1942-07-23 03:05:09, 1942-07-23 03:05:09, 1964-03-24 19:26:45, 1984-01-20 22:42:21, 1984-01-20 22:42:21}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestampcol', 'timestamptz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1942-07-23 03:05:09, 1942-07-23 03:05:09, 1964-03-24 19:26:45, 1984-01-20 22:42:21, 1984-01-20 22:42:21}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timestamptzcol', 'timestamptz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{1972-10-10 03:00:00-04, 1972-10-10 03:00:00-04, 1972-10-19 09:00:00-07, 1972-11-20 19:00:00-03, 1972-11-20 19:00:00-03}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('intervalcol', 'interval',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00:00:00, 00:00:00, 1 mons 13 days 12:24, 2 mons 23 days 07:48:00, 1 year}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('timetzcol', 'timetz',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{01:30:20+02, 01:30:20+02, 01:35:50+02, 23:55:05+02, 23:55:05+02}',
|
||||
'{99, 100, 2, 100, 100}'),
|
||||
('numericcol', 'numeric',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{0.00, 0.01, 2268164.347826086956521739130434782609, 99470151.9, 99470151.9}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('uuidcol', 'uuid',
|
||||
'{>, >=, =, <=, <}',
|
||||
'{00040004-0004-0004-0004-000400040004, 00040004-0004-0004-0004-000400040004, 52225222-5222-5222-5222-522252225222, 99989998-9998-9998-9998-999899989998, 99989998-9998-9998-9998-999899989998}',
|
||||
'{100, 100, 1, 100, 100}'),
|
||||
('lsncol', 'pg_lsn',
|
||||
'{>, >=, =, <=, <, IS, IS NOT}',
|
||||
'{0/1200, 0/1200, 44/455222, 198/1999799, 198/1999799, NULL, NULL}',
|
||||
'{100, 100, 1, 100, 100, 25, 100}');
|
||||
|
||||
DO $x$
|
||||
DECLARE
|
||||
r record;
|
||||
r2 record;
|
||||
cond text;
|
||||
idx_ctids tid[];
|
||||
ss_ctids tid[];
|
||||
count int;
|
||||
plan_ok bool;
|
||||
plan_line text;
|
||||
BEGIN
|
||||
FOR r IN SELECT colname, oper, typ, value[ordinality], matches[ordinality] FROM brinopers_multi, unnest(op) WITH ORDINALITY AS oper LOOP
|
||||
|
||||
-- prepare the condition
|
||||
IF r.value IS NULL THEN
|
||||
cond := format('%I %s %L', r.colname, r.oper, r.value);
|
||||
ELSE
|
||||
cond := format('%I %s %L::%s', r.colname, r.oper, r.value, r.typ);
|
||||
END IF;
|
||||
|
||||
-- run the query using the brin index
|
||||
SET enable_seqscan = 0;
|
||||
SET enable_bitmapscan = 1;
|
||||
|
||||
plan_ok := false;
|
||||
FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond) LOOP
|
||||
IF plan_line LIKE '%Bitmap Heap Scan on brintest_multi%' THEN
|
||||
plan_ok := true;
|
||||
END IF;
|
||||
END LOOP;
|
||||
IF NOT plan_ok THEN
|
||||
RAISE WARNING 'did not get bitmap indexscan plan for %', r;
|
||||
END IF;
|
||||
|
||||
EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond)
|
||||
INTO idx_ctids;
|
||||
|
||||
-- run the query using a seqscan
|
||||
SET enable_seqscan = 1;
|
||||
SET enable_bitmapscan = 0;
|
||||
|
||||
plan_ok := false;
|
||||
FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond) LOOP
|
||||
IF plan_line LIKE '%Seq Scan on brintest_multi%' THEN
|
||||
plan_ok := true;
|
||||
END IF;
|
||||
END LOOP;
|
||||
IF NOT plan_ok THEN
|
||||
RAISE WARNING 'did not get seqscan plan for %', r;
|
||||
END IF;
|
||||
|
||||
EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_multi WHERE %s $y$, cond)
|
||||
INTO ss_ctids;
|
||||
|
||||
-- make sure both return the same results
|
||||
count := array_length(idx_ctids, 1);
|
||||
|
||||
IF NOT (count = array_length(ss_ctids, 1) AND
|
||||
idx_ctids @> ss_ctids AND
|
||||
idx_ctids <@ ss_ctids) THEN
|
||||
-- report the results of each scan to make the differences obvious
|
||||
RAISE WARNING 'something not right in %: count %', r, count;
|
||||
SET enable_seqscan = 1;
|
||||
SET enable_bitmapscan = 0;
|
||||
FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_multi WHERE ' || cond LOOP
|
||||
RAISE NOTICE 'seqscan: %', r2;
|
||||
END LOOP;
|
||||
|
||||
SET enable_seqscan = 0;
|
||||
SET enable_bitmapscan = 1;
|
||||
FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_multi WHERE ' || cond LOOP
|
||||
RAISE NOTICE 'bitmapscan: %', r2;
|
||||
END LOOP;
|
||||
END IF;
|
||||
|
||||
-- make sure we found expected number of matches
|
||||
IF count != r.matches THEN RAISE WARNING 'unexpected number of results % for %', count, r; END IF;
|
||||
END LOOP;
|
||||
END;
|
||||
$x$;
|
||||
|
||||
RESET enable_seqscan;
|
||||
RESET enable_bitmapscan;
|
||||
|
||||
INSERT INTO brintest_multi SELECT
|
||||
142857 * tenthous,
|
||||
thousand,
|
||||
twothousand,
|
||||
unique1::oid,
|
||||
format('(%s,%s)', tenthous, twenty)::tid,
|
||||
(four + 1.0)/(hundred+1),
|
||||
odd::float8 / (tenthous + 1),
|
||||
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
|
||||
inet '10.2.3.4' + tenthous,
|
||||
cidr '10.2.3/24' + tenthous,
|
||||
date '1995-08-15' + tenthous,
|
||||
time '01:20:30' + thousand * interval '18.5 second',
|
||||
timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours',
|
||||
timestamptz '1972-10-10 03:00' + thousand * interval '1 hour',
|
||||
justify_days(justify_hours(tenthous * interval '12 minutes')),
|
||||
timetz '01:30:20' + hundred * interval '15 seconds',
|
||||
tenthous::numeric(36,30) * fivethous * even / (hundred + 1),
|
||||
format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid,
|
||||
format('%s/%s%s', odd, even, tenthous)::pg_lsn
|
||||
FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5;
|
||||
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
VACUUM brintest_multi; -- force a summarization cycle in brinidx
|
||||
|
||||
UPDATE brintest_multi SET int8col = int8col * int4col;
|
||||
|
||||
-- Tests for brin_summarize_new_values
|
||||
SELECT brin_summarize_new_values('brintest_multi'); -- error, not an index
|
||||
SELECT brin_summarize_new_values('tenk1_unique1'); -- error, not a BRIN index
|
||||
SELECT brin_summarize_new_values('brinidx_multi'); -- ok, no change expected
|
||||
|
||||
-- Tests for brin_desummarize_range
|
||||
SELECT brin_desummarize_range('brinidx_multi', -1); -- error, invalid range
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
SELECT brin_desummarize_range('brinidx_multi', 0);
|
||||
SELECT brin_desummarize_range('brinidx_multi', 100000000);
|
||||
|
||||
-- test building an index with many values, to force compaction of the buffer
|
||||
CREATE TABLE brin_large_range (a int4);
|
||||
INSERT INTO brin_large_range SELECT i FROM generate_series(1,10000) s(i);
|
||||
CREATE INDEX brin_large_range_idx ON brin_large_range USING brin (a int4_minmax_multi_ops);
|
||||
DROP TABLE brin_large_range;
|
||||
|
||||
-- Test brin_summarize_range
|
||||
CREATE TABLE brin_summarize_multi (
|
||||
value int
|
||||
) WITH (fillfactor=10, autovacuum_enabled=false);
|
||||
CREATE INDEX brin_summarize_multi_idx ON brin_summarize_multi USING brin (value) WITH (pages_per_range=2);
|
||||
-- Fill a few pages
|
||||
DO $$
|
||||
DECLARE curtid tid;
|
||||
BEGIN
|
||||
LOOP
|
||||
INSERT INTO brin_summarize_multi VALUES (1) RETURNING ctid INTO curtid;
|
||||
EXIT WHEN curtid > tid '(2, 0)';
|
||||
END LOOP;
|
||||
END;
|
||||
$$;
|
||||
|
||||
-- summarize one range
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 0);
|
||||
-- nothing: already summarized
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 1);
|
||||
-- summarize one range
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 2);
|
||||
-- nothing: page doesn't exist in table
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 4294967295);
|
||||
-- invalid block number values
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', -1);
|
||||
SELECT brin_summarize_range('brin_summarize_multi_idx', 4294967296);
|
||||
|
||||
|
||||
-- test brin cost estimates behave sanely based on correlation of values
|
||||
CREATE TABLE brin_test_multi (a INT, b INT);
|
||||
INSERT INTO brin_test_multi SELECT x/100,x%100 FROM generate_series(1,10000) x(x);
|
||||
CREATE INDEX brin_test_multi_a_idx ON brin_test_multi USING brin (a) WITH (pages_per_range = 2);
|
||||
CREATE INDEX brin_test_multi_b_idx ON brin_test_multi USING brin (b) WITH (pages_per_range = 2);
|
||||
VACUUM ANALYZE brin_test_multi;
|
||||
|
||||
-- Ensure brin index is used when columns are perfectly correlated
|
||||
EXPLAIN (COSTS OFF) SELECT * FROM brin_test_multi WHERE a = 1;
|
||||
-- Ensure brin index is not used when values are not correlated
|
||||
EXPLAIN (COSTS OFF) SELECT * FROM brin_test_multi WHERE b = 1;
|
Reference in New Issue
Block a user