Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial SpatiaLite ↔ PostGIS support #96

Merged
merged 90 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
11e2bc3
Add initial SpatiaLite ↔ PostGIS support
mkgrgis Jan 11, 2024
db79d5a
Add initial SpatiaLite ↔ PostGIS support
mkgrgis Sep 30, 2024
d6534c7
Improve CI scripts supporting tests with PostGIS on CI Actions
mkgrgis Oct 7, 2024
15e1036
Merge branch 'master' into postgis_rewiews
mkgrgis Oct 7, 2024
3bc622b
Fix build process and pushing down
mkgrgis Oct 11, 2024
a0c2c57
Fix build spec Makefile
mkgrgis Oct 11, 2024
5745c92
Try to fix pushing down
mkgrgis Oct 11, 2024
55b643f
Simplify pushing predicate
mkgrgis Oct 11, 2024
38e1eb3
Try other predicate
mkgrgis Oct 11, 2024
feff025
Fix gcc warning
mkgrgis Oct 11, 2024
7db76ec
2nd trying to fix pushing prredicate
mkgrgis Oct 11, 2024
baf120f
3rd fix of pushable predicate
mkgrgis Oct 11, 2024
17c12f8
Fix malloc, improve comments
mkgrgis Oct 11, 2024
f1bdb98
Fix unused var
mkgrgis Oct 11, 2024
fbe71c9
4rd pushing predicate variant
mkgrgis Oct 11, 2024
9853c00
5th deparsing predicate variant
mkgrgis Oct 11, 2024
830bb38
Add PostGIS operator TCs
mkgrgis Oct 11, 2024
334ccae
Add other PostGIS TCs
mkgrgis Oct 11, 2024
035c3ca
Fix TC order
mkgrgis Oct 11, 2024
f8b8371
Add comments
mkgrgis Oct 11, 2024
54cfa4d
6th fix pushing predicate
mkgrgis Oct 11, 2024
919b5f6
7th ppushing predicate
mkgrgis Oct 11, 2024
3bc5b7a
8th pushing predicate
mkgrgis Oct 11, 2024
af4f06e
Revert pushdown prediacte
mkgrgis Oct 12, 2024
eddfd65
fix nogis tests
mkgrgis Oct 14, 2024
aab56af
Improve constant deparsing
mkgrgis Oct 15, 2024
996d375
Fix code style & behaviour without GIS support, add TCs
mkgrgis Oct 16, 2024
5e66258
Fix GIS constants deparsing
mkgrgis Oct 16, 2024
55408d5
Fix code style
mkgrgis Oct 16, 2024
1546cb9
Fix comment
mkgrgis Oct 16, 2024
7457e46
Expand PostGIS tests
mkgrgis Oct 16, 2024
2fedef4
Add expected result for current implementation
mkgrgis Oct 16, 2024
a61647f
Fix TC 41 comment
mkgrgis Oct 17, 2024
1a6adfe
Fix comments and TCs
mkgrgis Oct 17, 2024
c217d55
Fix file ini
mkgrgis Oct 17, 2024
b06159a
Fix nogis SQLite BLOB tests
mkgrgis Oct 18, 2024
bc5bef9
Update nogis test, commit for failed results
mkgrgis Oct 22, 2024
1d1f031
Fix nogis tests
mkgrgis Oct 22, 2024
178ac66
fix and expand tests
mkgrgis Oct 25, 2024
966ada5
Try other TCs
mkgrgis Oct 25, 2024
d9a0d5f
Fix postgis tests
mkgrgis Oct 25, 2024
98a6474
Add PostGIS tests
mkgrgis Oct 28, 2024
3f15b65
Fix PostGIS const deparsing
mkgrgis Oct 28, 2024
ca4351e
Add DEFINE branches to PostGIS const deparsing
mkgrgis Oct 28, 2024
2bd1a57
Reduce double calculation
mkgrgis Oct 28, 2024
348f228
Try other PostGIs const deparsing
mkgrgis Oct 28, 2024
27eb087
Fix extval
mkgrgis Oct 28, 2024
cc5f643
Fix function call
mkgrgis Oct 28, 2024
a120f2a
Add PostGIS TCs
mkgrgis Oct 28, 2024
89f1d10
Fix TC 61
mkgrgis Oct 28, 2024
9775492
Add new testing results
mkgrgis Oct 28, 2024
34265fe
Remove some operator tests
mkgrgis Oct 28, 2024
aedd651
Remove operators from result
mkgrgis Oct 28, 2024
84c925d
Add postgis TCs
mkgrgis Oct 29, 2024
8c5d712
Remove some built-in operators test
mkgrgis Oct 29, 2024
4a92806
Remove not unique operators from postgis test
mkgrgis Oct 29, 2024
6fa6224
Renumerate TCs
mkgrgis Oct 29, 2024
bacc068
Fix TCs
mkgrgis Oct 29, 2024
9b6f970
Fix expected
mkgrgis Oct 29, 2024
36d2b81
Fix comments, remove invalid TC
Oct 29, 2024
7d65e56
Fix expected
Oct 29, 2024
d086e3f
Add else if, sqlite_query.c
mkgrgis Oct 30, 2024
5e075a6
Fix `listed_datatype_oid` signature
Oct 30, 2024
74366ca
Fix spell
Oct 30, 2024
3e4e043
Fix `hexPrefix` legth for copy + `\0`
Oct 30, 2024
7aa5876
Fix text independence
Oct 31, 2024
a9a7d1d
Make separate `type` test for different ENABLE_GIS
Oct 31, 2024
70dec88
Fix test results path
Oct 31, 2024
da83c9c
Fix additional TCs
Oct 31, 2024
574a48d
Try to fix memory freeing
Oct 31, 2024
d31517a
Reduce double calculations
Oct 31, 2024
4da3346
Add `static` in signature, `sqlite_gis.c`
mkgrgis Nov 1, 2024
8ef9844
Add memory free call for SpatiaLite geom collection, sqlite_gis.c
mkgrgis Nov 8, 2024
68f9588
Try to use internal SpatiaLite cache
mkgrgis Nov 14, 2024
20d73d2
Add headers
mkgrgis Nov 14, 2024
fac9a43
Revert context usage
mkgrgis Nov 14, 2024
bba7648
Fix code style to SpatiaLite impl.
mkgrgis Nov 14, 2024
da25ebc
Reset tests before v2.5.0
mkgrgis Dec 12, 2024
524871f
Add v2.5.0 tests
mkgrgis Dec 12, 2024
8890cb1
Fix init data
mkgrgis Dec 12, 2024
eaeccb2
Revert "types_PostGIS" SQLite test table
mkgrgis Dec 12, 2024
18d31e4
Fix sqlite_fdw test
mkgrgis Dec 12, 2024
6c8fb13
Merge branch 'master' into postgis_2_5_0
mkgrgis Dec 12, 2024
26341be
Merge mac implementation from 'master' into postgis_2_5_0
mkgrgis Dec 20, 2024
d027a90
Remove GIS tests from extra (now in types)
mkgrgis Dec 20, 2024
009c5f7
Squash last 10 commits
mkgrgis Jan 7, 2025
88ef53c
By 2nd review: restore regress + improve docs
mkgrgis Jan 7, 2025
c53c281
Fix spell
mkgrgis Jan 7, 2025
11d62de
Fix typo by review, restore type_BOOLENAN in type_* tests, remove typ…
mkgrgis Jan 8, 2025
821a711
Fix inline doc in script
mkgrgis Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GitHubActions/build_postgis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ cd postgis
echo " - PostGIS directory"
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-geosconfig=$GEOS_CONFIG_PATH
#CFLAGS="$CFLAGS -DPROJ_RENAME_SYMBOLS -O2" # Use C++ renaming for different libproj versions for SpatiaLite and PostGIS
mkgrgis marked this conversation as resolved.
Show resolved Hide resolved
make
sudo make install
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GISTEST=nogis
endif

ifndef REGRESS
REGRESS = extra/sqlite_fdw_post types/bitstring types/bool types/float4 types/float8 types/int4 types/int8 types/numeric extra/$(GISTEST) types/macaddr types/macaddr8 types/out_of_range types/timestamp types/uuid extra/join extra/limit extra/aggregates extra/prepare extra/select_having extra/select extra/insert extra/update extra/encodings sqlite_fdw type_$(GISTEST) aggregate selectfunc
REGRESS = extra/sqlite_fdw_post types/bitstring types/bool types/float4 types/float8 types/int4 types/int8 types/numeric types/$(GISTEST) types/macaddr types/macaddr8 types/out_of_range types/timestamp types/uuid extra/join extra/limit extra/aggregates extra/prepare extra/select_having extra/select extra/insert extra/update extra/encodings sqlite_fdw type_$(GISTEST) aggregate selectfunc
endif

REGRESS_OPTS = --encoding=utf8
Expand Down
33 changes: 6 additions & 27 deletions expected/13.15/type_postgis.out
Original file line number Diff line number Diff line change
Expand Up @@ -307,32 +307,7 @@ ALTER FOREIGN TABLE "type_BOOLEAN" DROP COLUMN i;
SELECT * FROM "type_BOOLEAN"; -- OK
b
---
t
f
t
f
t
f
t
t
t
f
f
f
f
f
t
t
t
t
t
t
f
f
f
t

(25 rows)
(0 rows)

-- define INTEGER as TEXT column
--Testcase 67:
Expand Down Expand Up @@ -554,7 +529,7 @@ SELECT * FROM "type_DOUBLE"; -- OK, +- Inf

--Testcase 47:
DROP EXTENSION sqlite_fdw CASCADE;
NOTICE: drop cascades to 51 other objects
NOTICE: drop cascades to 55 other objects
DETAIL: drop cascades to server sqlite_svr
drop cascades to foreign table department
drop cascades to foreign table employee
Expand Down Expand Up @@ -584,6 +559,10 @@ drop cascades to foreign table "type_BIT"
drop cascades to foreign table "type_VARBIT"
drop cascades to foreign table "type_UUIDpk"
drop cascades to foreign table "type_UUID"
drop cascades to foreign table "type_MACADDRpk"
drop cascades to foreign table "type_MACADDR"
drop cascades to foreign table "type_MACADDR8pk"
drop cascades to foreign table "type_MACADDR8"
drop cascades to foreign table "types_PostGIS"
drop cascades to foreign table "BitT"
drop cascades to foreign table notype
Expand Down
362 changes: 362 additions & 0 deletions expected/13.15/types/nogis.out

Large diffs are not rendered by default.

1,746 changes: 1,746 additions & 0 deletions expected/13.15/types/postgis.out

Large diffs are not rendered by default.

33 changes: 6 additions & 27 deletions expected/14.12/type_postgis.out
Original file line number Diff line number Diff line change
Expand Up @@ -307,32 +307,7 @@ ALTER FOREIGN TABLE "type_BOOLEAN" DROP COLUMN i;
SELECT * FROM "type_BOOLEAN"; -- OK
b
---
t
f
t
f
t
f
t
t
t
f
f
f
f
f
t
t
t
t
t
t
f
f
f
t

(25 rows)
(0 rows)

-- define INTEGER as TEXT column
--Testcase 67:
Expand Down Expand Up @@ -554,7 +529,7 @@ SELECT * FROM "type_DOUBLE"; -- OK, +- Inf

--Testcase 47:
DROP EXTENSION sqlite_fdw CASCADE;
NOTICE: drop cascades to 51 other objects
NOTICE: drop cascades to 55 other objects
DETAIL: drop cascades to server sqlite_svr
drop cascades to foreign table department
drop cascades to foreign table employee
Expand Down Expand Up @@ -584,6 +559,10 @@ drop cascades to foreign table "type_BIT"
drop cascades to foreign table "type_VARBIT"
drop cascades to foreign table "type_UUIDpk"
drop cascades to foreign table "type_UUID"
drop cascades to foreign table "type_MACADDRpk"
drop cascades to foreign table "type_MACADDR"
drop cascades to foreign table "type_MACADDR8pk"
drop cascades to foreign table "type_MACADDR8"
drop cascades to foreign table "types_PostGIS"
drop cascades to foreign table "BitT"
drop cascades to foreign table notype
Expand Down
362 changes: 362 additions & 0 deletions expected/14.12/types/nogis.out

Large diffs are not rendered by default.

1,746 changes: 1,746 additions & 0 deletions expected/14.12/types/postgis.out

Large diffs are not rendered by default.

Loading