Files
maxime.killinger dcf4169d3d
🚀 Docker Build and Push / build-and-push (16) (push) Successful in 16m11s
🚀 Docker Build and Push / build-and-push (15) (push) Successful in 16m26s
🚀 Docker Build and Push / build-and-push (17) (push) Successful in 11m7s
feat(docker): add PostGIS and remove unstable PG18 support
- Install PostGIS (postgresql--postgis-3) in the final image.

- Add postgis and postgis_topology to init-extensions.sh.

- Add test script for PostGIS to the CI workflow.

- Update README.md to reflect PostGIS integration.

- Remove PG18 from CI matrix because of ABI incompatibility between TimescaleDB headers and the vchord-postgres PG18 runtime (missing palloc0_mul). PG18 support will be restored when VectorChord releases a stable PG18 image.
2026-08-03 18:14:08 +02:00

29 lines
701 B
SQL

-- Test 5: PostGIS
\set ON_ERROR_STOP on
CREATE TABLE spatial_data (
id serial PRIMARY KEY,
geom geometry(Point, 4326)
);
INSERT INTO spatial_data (geom) VALUES (ST_GeomFromText('POINT(-71.060316 48.432044)', 4326));
INSERT INTO spatial_data (geom) VALUES (ST_GeomFromText('POINT(-71.059773 48.432867)', 4326));
DO $$
DECLARE
dist float;
BEGIN
SELECT ST_Distance(
(SELECT geom FROM spatial_data WHERE id = 1),
(SELECT geom FROM spatial_data WHERE id = 2)
) INTO dist;
IF dist IS NULL THEN
RAISE EXCEPTION 'PostGIS distance calculation failed';
END IF;
RAISE NOTICE 'PostGIS Check: OK, distance is %', dist;
END
$$;
DROP TABLE spatial_data;