Project

General

Profile

Actions

Patch #35816

open

Patch to add Postgis adapter support

Added by Marcel B about 3 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I've been running Redmine with postgis adapter for while to support a plugin for spatial data.

The proposed patch is necessary to eliminate annoying waning messages from Gemfile and to allow Query with case insentive (ILIKE), since postgis only adds spatial functions on top of the postgresql adapter.

It was tested for several months on FreeBSD 12 and CentOS 7.


Files

redmine-4.2-postgis.diff (1.16 KB) redmine-4.2-postgis.diff patch file Marcel B, 2021-08-25 17:44
Actions #1

Updated by Mischa The Evil about 3 years ago

I'm not sure if this is something Redmine should support OOTB within the core.

What do other people think about this?

Actions #2

Updated by Marcel B about 3 years ago

Thanks for the opportunity to discuss this subject!

I think it is not going to break builtin compatibility with pg adapter, as stated in https://rubygems.org/gems/activerecord-postgis-adapter :

ActiveRecord connection adapter for PostGIS. It is based on the stock PostgreSQL adapter, and adds built-in support for the spatial extensions provided by PostGIS. It uses the RGeo library to represent spatial data in Ruby.

I read parts of the postgis source code, and it really uses pg adapter to address all non spatial queries.

Gemfile:

source "https://rubygems.org" 

# Specify your gem's dependencies in activerecord-postgis-adapter.gemspec
gemspec

gem "pg", "~> 1.0", platform: :ruby
gem "activerecord-jdbcpostgresql-adapter", platform: :jruby
gem "ffi-geos", platform: :jruby
gem "byebug" if ENV["BYEBUG"]

Actions

Also available in: Atom PDF