diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bf4773..c6c6558 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - postgres: [15, 14, 13, 12, 11, 10] + postgres: [15, 14, 13, 12, 11] steps: - uses: actions/checkout@v3 - uses: ankane/setup-postgres@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e444b74..ae20e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Changed text representation for vector elements to match `real` - Improved accuracy of text parsing for certain inputs - Added experimental support for Windows +- Dropped support for Postgres 10 ## 0.3.2 (2022-11-22) diff --git a/META.json b/META.json index 07326d6..85f02b5 100644 --- a/META.json +++ b/META.json @@ -12,7 +12,7 @@ "prereqs": { "runtime": { "requires": { - "PostgreSQL": "10.0.0" + "PostgreSQL": "11.0.0" } } }, diff --git a/src/ivfbuild.c b/src/ivfbuild.c index 03b9a29..8b3924a 100644 --- a/src/ivfbuild.c +++ b/src/ivfbuild.c @@ -22,13 +22,8 @@ #define PROGRESS_CREATEIDX_TUPLES_DONE 0 #endif -#if PG_VERSION_NUM >= 110000 #include "catalog/pg_operator_d.h" #include "catalog/pg_type_d.h" -#else -#include "catalog/pg_operator.h" -#include "catalog/pg_type.h" -#endif #if PG_VERSION_NUM >= 130000 #define CALLBACK_ITEM_POINTER ItemPointer tid @@ -117,12 +112,9 @@ SampleRows(IvfflatBuildState * buildstate) #if PG_VERSION_NUM >= 120000 table_index_build_range_scan(buildstate->heap, buildstate->index, buildstate->indexInfo, false, true, false, targblock, 1, SampleCallback, (void *) buildstate, NULL); -#elif PG_VERSION_NUM >= 110000 - IndexBuildHeapRangeScan(buildstate->heap, buildstate->index, buildstate->indexInfo, - false, true, targblock, 1, SampleCallback, (void *) buildstate, NULL); #else IndexBuildHeapRangeScan(buildstate->heap, buildstate->index, buildstate->indexInfo, - false, true, targblock, 1, SampleCallback, (void *) buildstate); + false, true, targblock, 1, SampleCallback, (void *) buildstate, NULL); #endif } } @@ -327,11 +319,7 @@ InitBuildState(IvfflatBuildState * buildstate, Relation heap, Relation index, In #endif TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 1, "list", INT4OID, -1, 0); TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 2, "tid", TIDOID, -1, 0); -#if PG_VERSION_NUM >= 110000 TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 3, "vector", RelationGetDescr(index)->attrs[0].atttypid, -1, 0); -#else - TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 3, "vector", RelationGetDescr(index)->attrs[0]->atttypid, -1, 0); -#endif #if PG_VERSION_NUM >= 120000 buildstate->slot = MakeSingleTupleTableSlot(buildstate->tupdesc, &TTSOpsVirtual); @@ -531,11 +519,7 @@ CreateEntryPages(IvfflatBuildState * buildstate, ForkNumber forkNum) UpdateProgress(PROGRESS_CREATEIDX_SUBPHASE, PROGRESS_IVFFLAT_PHASE_SORT); -#if PG_VERSION_NUM >= 110000 buildstate->sortstate = tuplesort_begin_heap(buildstate->tupdesc, 1, attNums, sortOperators, sortCollations, nullsFirstFlags, maintenance_work_mem, NULL, false); -#else - buildstate->sortstate = tuplesort_begin_heap(buildstate->tupdesc, 1, attNums, sortOperators, sortCollations, nullsFirstFlags, maintenance_work_mem, false); -#endif /* Add tuples to sort */ if (buildstate->heap != NULL) @@ -543,12 +527,9 @@ CreateEntryPages(IvfflatBuildState * buildstate, ForkNumber forkNum) #if PG_VERSION_NUM >= 120000 buildstate->reltuples = table_index_build_scan(buildstate->heap, buildstate->index, buildstate->indexInfo, true, true, BuildCallback, (void *) buildstate, NULL); -#elif PG_VERSION_NUM >= 110000 - buildstate->reltuples = IndexBuildHeapScan(buildstate->heap, buildstate->index, buildstate->indexInfo, - true, BuildCallback, (void *) buildstate, NULL); #else buildstate->reltuples = IndexBuildHeapScan(buildstate->heap, buildstate->index, buildstate->indexInfo, - true, BuildCallback, (void *) buildstate); + true, BuildCallback, (void *) buildstate, NULL); #endif } diff --git a/src/ivfflat.c b/src/ivfflat.c index 5ad3378..3731b28 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -181,9 +181,7 @@ ivfflathandler(PG_FUNCTION_ARGS) amroutine->amclusterable = false; amroutine->ampredlocks = false; amroutine->amcanparallel = false; -#if PG_VERSION_NUM >= 110000 amroutine->amcaninclude = false; -#endif #if PG_VERSION_NUM >= 130000 amroutine->amusemaintenanceworkmem = false; /* not used during VACUUM */ amroutine->amparallelvacuumoptions = VACUUM_OPTION_PARALLEL_BULKDEL; diff --git a/src/ivfscan.c b/src/ivfscan.c index 1879bc4..108b4c5 100644 --- a/src/ivfscan.c +++ b/src/ivfscan.c @@ -7,13 +7,8 @@ #include "miscadmin.h" #include "storage/bufmgr.h" -#if PG_VERSION_NUM >= 110000 #include "catalog/pg_operator_d.h" #include "catalog/pg_type_d.h" -#else -#include "catalog/pg_operator.h" -#include "catalog/pg_type.h" -#endif /* * Compare list distances @@ -216,11 +211,7 @@ ivfflatbeginscan(Relation index, int nkeys, int norderbys) TupleDescInitEntry(so->tupdesc, (AttrNumber) 3, "indexblkno", INT4OID, -1, 0); /* Prep sort */ -#if PG_VERSION_NUM >= 110000 so->sortstate = tuplesort_begin_heap(so->tupdesc, 1, attNums, sortOperators, sortCollations, nullsFirstFlags, work_mem, NULL, false); -#else - so->sortstate = tuplesort_begin_heap(so->tupdesc, 1, attNums, sortOperators, sortCollations, nullsFirstFlags, work_mem, false); -#endif #if PG_VERSION_NUM >= 120000 so->slot = MakeSingleTupleTableSlot(so->tupdesc, &TTSOpsMinimalTuple);