Opened 10 years ago

Closed 3 years ago

Last modified 3 years ago

#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 strk, 10 years ago

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!

comment:2 by robe, 10 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 strk, 9 years ago

Milestone: PostGIS 2.2.0PostGIS Future
Type: defecttask

This would involve adding a _drop file for topology, augmenting complexity. I don't feel any urge for that.

comment:4 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:5 by strk, 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:6 by Sandro Santilli <strk@…>, 3 years ago

In fba0330/git:

Do not allow SRID < 0 in the topology.topology schema

References #2592

comment:7 by strk, 3 years ago

OOps, commit [fba0330289c7ad2ed3cc5642f259940c59beda6b/git] was for #3192, not this ticket

Last edited 3 years ago by strk (previous) (diff)

comment:8 by Sandro Santilli <strk@…>, 3 years ago

Resolution: fixed
Status: newclosed

In 003080f/git:

Remove redundant AddNode() function

Closes #2592

comment:9 by strk, 3 years ago

Milestone: PostGIS Fund MePostGIS 3.2.0
Note: See TracTickets for help on using tickets.