[gdal-dev] ogr2ogr postgres index generation
Hanskaspar Frei
hkfrei at karten-werk.ch
Tue Jul 30 01:57:05 PDT 2024
Hi everybody
We used an old GDAL Version (3.2.1) to load data to a postgis db with
ogr2ogr.
There was an automatic spatial index generation taking place, which
seemed to have a logic to avoid duplicated index names.
Examples with GDAL 3.2.1:
For a table with the name
"ch059_liegenschaften_grundstueckpos_hilfslinien" a index named
"ch059_liegenschaften_grundstueckpos_hilfs_wkb_geometry_geom_idx" got
created.
For a table with the name
"ch059_liegenschaften_grundstueckpos_hilfslinien_proj" a index named
"ch059_liegenschaften_grundstueckpos_hilfslinien_proj_wkb_geomet" got
created.
Examples with GDAL 3.9.1:
For a table with the name
"ch059_liegenschaften_grundstueckpos_hilfslinien" a index named
"ch059_liegenschaften_grundstueckpos_hilfs_wkb_geometry_geom_idx" got
created.(equal like GDAL 3.2.1)
For a table with the name
"ch059_liegenschaften_grundstueckpos_hilfslinien_proj" it tries to
create an index named
"ch059_liegenschaften_grundstueckpos_hilfs_wkb_geometry_geom_idx" which
is equal to the one of the table above and therefore not valid in postgres
I am aware that the the maximum identifier length in postgis is 63 Bytes
and therefore the index names get cutted.
But why is this change in the index naming happening between GDAL
Version 3.2.1 and 3.9.1?
We don't want to downgrade to the old GDAL Version, but Is there a way
to go back to the old naming system which avoided duplicated names?
Thanks and best regards
Hanskaspar Frei
--
[logo]
Karten-Werk GmbH
Hanskaspar Frei
Via Vincenzo Dalberti 13
6718 Olivone
Phone: +41 79 360 72 83
Web: https://karten-werk.ch | E-Mail: hkfrei at karten-werk.ch<mailto:hkfrei at karten-werk.ch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240730/3f0680d5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logomarker.png
Type: image/png
Size: 2456 bytes
Desc: logomarker.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240730/3f0680d5/attachment.png>
More information about the gdal-dev
mailing list