Skip to content

Commit 4be07f6

Browse files
committed
increase minimum required versions for dependencies
This is in line with what can be tested in the CI.
1 parent c90e1a3 commit 4be07f6

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ if (NOT WIN32 AND NOT APPLE)
6464
set(PostgreSQL_TYPE_INCLUDE_DIR /usr/include)
6565
endif()
6666

67-
set(MINIMUM_POSTGRESQL_SERVER_VERSION "9.6")
68-
set(MINIMUM_POSTGRESQL_SERVER_VERSION_NUM "90600")
67+
set(MINIMUM_POSTGRESQL_SERVER_VERSION "11")
68+
set(MINIMUM_POSTGRESQL_SERVER_VERSION_NUM "110000")
6969

70-
set(PostgreSQL_ADDITIONAL_VERSIONS "17" "16" "15" "14" "13" "12" "11" "10" "9.6")
70+
set(PostgreSQL_ADDITIONAL_VERSIONS "17" "16" "15" "14" "13" "12" "11")
7171

7272
#############################################################
7373
# Version

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ with other versions of those libraries (set the `EXTERNAL_*libname*` option to
6666
* [protozero](https://github.com/mapbox/protozero) (>= 1.6.3)
6767

6868
It also requires access to a database server running
69-
[PostgreSQL](https://www.postgresql.org/) (version 9.6+ works, 13+ strongly
70-
recommended) and [PostGIS](https://www.postgis.net/) (version 2.5+).
69+
[PostgreSQL](https://www.postgresql.org/) (version 11+ works, 13+ strongly
70+
recommended) and [PostGIS](https://www.postgis.net/) (version 3.0+).
7171

7272
Make sure you have installed the development packages for the libraries
7373
mentioned in the requirements section and a C++ compiler which supports C++17.
74-
We officially support gcc >= 8.0 and clang >= 8.
74+
We officially support gcc >= 10.0 and clang >= 13.
7575

7676
To rebuild the included man page you'll need the [pandoc](https://pandoc.org/)
7777
tool.

src/flex-lua-index.cpp

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,17 @@ void flex_lua_setup_index(lua_State *lua_state, flex_table_t *table)
105105
// get include columns
106106
std::vector<std::string> include_columns;
107107
lua_getfield(lua_state, -1, "include");
108-
if (get_database_version() >= 110000) {
109-
if (lua_isstring(lua_state, -1)) {
110-
check_and_add_column(*table, &include_columns,
111-
lua_tostring(lua_state, -1));
112-
} else if (lua_istable(lua_state, -1)) {
113-
check_and_add_columns(*table, &include_columns, lua_state);
114-
} else if (!lua_isnil(lua_state, -1)) {
115-
throw std::runtime_error{
116-
"The 'include' field in an index definition must contain a "
117-
"string or an array."};
118-
}
119-
index.set_include_columns(include_columns);
108+
if (lua_isstring(lua_state, -1)) {
109+
check_and_add_column(*table, &include_columns,
110+
lua_tostring(lua_state, -1));
111+
} else if (lua_istable(lua_state, -1)) {
112+
check_and_add_columns(*table, &include_columns, lua_state);
120113
} else if (!lua_isnil(lua_state, -1)) {
121-
throw fmt_error("Database version ({}) doesn't support"
122-
" include columns in indexes.",
123-
get_database_version());
114+
throw std::runtime_error{
115+
"The 'include' field in an index definition must contain a "
116+
"string or an array."};
124117
}
118+
index.set_include_columns(include_columns);
125119
lua_pop(lua_state, 1);
126120

127121
// get tablespace

src/osm2pgsql.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ void check_db(options_t const &options)
8989
init_database_capabilities(db_connection);
9090

9191
auto const pv = get_postgis_version();
92-
if (pv.major < 2 || (pv.major == 2 && pv.minor < 5)) {
93-
throw std::runtime_error{"Need at least PostGIS version 2.5"};
92+
if (pv.major < 3) {
93+
throw std::runtime_error{"Need at least PostGIS version 3.0"};
9494
}
9595

9696
check_schema(options.dbschema);

0 commit comments

Comments
 (0)