Opened 5 years ago
Closed 5 years ago
#4599 closed defect (fixed)
ST_AddPoint doesn't work with index -1
Reported by: | Algunenano | Owned by: | Algunenano |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.5.4 |
Component: | postgis | Version: | 2.5.x -- EOL |
Keywords: | Cc: |
Description
As reported in https://lists.osgeo.org/pipermail/postgis-users/2019-December/043765.html:
On Mon, Dec 9, 2019 at 8:43 PM Charlton Galvarino wrote: > > Hello, PostGIS. I have some legacy functions on my hand that I am bringing out of the Dark Ages. > > Once upon a time, I needed to take advantage of the "position" parameter to explicitly indicate that I wanted to append to a linestring. > > select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0), st_makepoint(1, 1)), st_makepoint(2,2), -1)); > st_astext > ------------------------- > LINESTRING(0 0,1 1,2 2) > > Apparently that is now the same thing had I left off the -1 completely. > > select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0), st_makepoint(1, 1)), st_makepoint(2,2))); > st_astext > ------------------------- > LINESTRING(0 0,1 1,2 2) > > However, if I left the -1 in there which still seems to support the current documentation, https://postgis.net/docs/ST_AddPoint.html, psql protesteth. > > select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0), st_makepoint(1, 1)), st_makepoint(2,2), -1)); > ERROR: Invalid offset > > Perhaps the doc should drop the -1, too?
The issue was introduced in rf9e9411add7a32e4bdc907967c6664242a257ac4 so I'd expect 2.5, 3.0 and master to be affected.
Change History (5)
comment:1 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:2 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I still need to backport this to 3.0 and 2.5
comment:5 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
In bbbd77d/git: