#2592 closed task (fixed)
AddNode(atopology, apoint) redundant
Reported by: | robe | Owned by: | strk |
---|---|---|---|
Priority: | low | Milestone: | PostGIS 3.2.0 |
Component: | topology | Version: | 2.1.x |
Keywords: | Cc: |
Description
In looking at functions that aren't documented, I noticed we have
topology.addnode(atopology character varying, apoint geometry)
The reason it isn't documented is our docs say
topology.addnode(atopology character varying, apoint geometry, allowedgesplitting boolean DEFAULT false, setcontainingface boolean DEFAULT false)
but the actual implementation is
topology.addnode(atopology character varying, apoint geometry, allowedgesplitting boolean, setcontainingface boolean DEFAULT false)
We should probably clean this up in 2.2. Probably not worthwhile to fix in 2.½.0. In the end it will be the same, just one less function.
Change History (9)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
we drop old ones in postgis proper when we define new with defaults.
I like fewer functions. That's more kissy to me
comment:3 by , 10 years ago
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|---|
Type: | defect → task |
This would involve adding a _drop file for topology, augmenting complexity. I don't feel any urge for that.
comment:5 by , 3 years ago
We DO have a topology_drop_before and topology_drop_after support now, so it may be time to fix this (if still an issue)
comment:7 by , 3 years ago
OOps, commit [fba0330289c7ad2ed3cc5642f259940c59beda6b/git] was for #3192, not this ticket
comment:9 by , 3 years ago
Milestone: | PostGIS Fund Me → PostGIS 3.2.0 |
---|
That's the result of my lazy way to deal with upgrades. Adding an optional parameter doesn't replace the old signature, so in order to do a clean upgrade you'd have to _drop_ the previous, which is not something you do in an install file.
When I'm willing to provide a single .sql to do both install and upgrade (because I'm lazy) that's what I do: never drop any signature, and if I need more parameters keep the old one as wrappers that call the new one passing the defaults. This has been working since PostGIS-1.0 against PostgreSQL 6.X …
Keep it simple!