mirror of
https://github.com/maplibre/martin.git
synced 2024-12-20 13:21:59 +03:00
fc9170d164
* feat: add multiple geometry columns support in table sources * test: add multiple geometry tests
18 lines
764 B
SQL
18 lines
764 B
SQL
CREATE TABLE table_source_multiple_geom (
|
|
gid serial PRIMARY KEY,
|
|
geom1 GEOMETRY(point, 4326),
|
|
geom2 GEOMETRY(point, 4326)
|
|
);
|
|
|
|
INSERT INTO table_source_multiple_geom
|
|
SELECT
|
|
generate_series(1, 10000) AS id,
|
|
(ST_DUMP (ST_GENERATEPOINTS (ST_GEOMFROMTEXT ('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326), 10000))).geom,
|
|
(ST_DUMP (ST_GENERATEPOINTS (ST_GEOMFROMTEXT ('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326), 10000))).geom;
|
|
|
|
CREATE INDEX ON table_source_multiple_geom USING GIST (geom1);
|
|
CREATE INDEX ON table_source_multiple_geom USING GIST (geom2);
|
|
|
|
CLUSTER table_source_multiple_geom_geom1_idx ON table_source_multiple_geom;
|
|
CLUSTER table_source_multiple_geom_geom2_idx ON table_source_multiple_geom;
|