Opened 13 years ago

Closed 12 years ago

#961 closed defect (fixed)

Reduce number of functions by making many have default args

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

I've already done this with ST_AsX3D. I'd like to conquer all the output functions (adding as Paul suggested to the upgrade scripts — a drop clause).

But since we don't have an upgrade script for pre-PostGIS 2.0, I suppose this would prove difficult.

I could throw it in the uninstall_legacy.sql I am working on which I think we will require people to run anyway to get rid of all those legacy functions that get restored when they restore their backup on top of a pristine PostGIS 2.0 install.

One I've been really eying is that ST_AsGML which has 15 (count 15 permutations). That should reduce us down to about 4 or 5 for that one.

Change History (14)

comment:1 by robe, 13 years ago

r7299 — got rid of ST_Area(geography) — changed ST_Area(geog, use_spheroid = true)

already done for ST_ConcaveHull as well

comment:2 by strk, 13 years ago

Please don't forget that any such change would require an explicit DROP FUNCTION for the old signatures, or you end up with "ambiguos" calls.

comment:3 by robe, 13 years ago

I didn't, see how I added it to the postgis drop - which gets called for both old , new, and uninstall legacy installs.

That's the other reason I have an uninstall legacy so that if people install there backup untop of a new postgis 2.0, they can run uninstall legacy to get rid of old junk.

comment:4 by robe, 12 years ago

done for ST_AsSVG at r8617 and r8618

comment:5 by strk, 12 years ago

A concern I have with this is that it'd then take some DROP FUNCTION calls to upgrade from previous definitions, or you end up with ambiguous calls when omitting params. The current _upgrade_xxy machinery doesn't do drops, does it ?

comment:6 by robe, 12 years ago

yes it does. postgis_drop.sql.in.c and postgis_drop_before.sql.in.c are included for upgrade script.

comment:7 by robe, 12 years ago

r8629 ST_AsGML reduced

comment:8 by robe, 12 years ago

Done for ST_AsKML at r8638, r8639

comment:9 by robe, 12 years ago

Done for ST_AsGeoJSON at r8640

comment:10 by robe, 12 years ago

Done for ST_GeoHash at r8642

in reply to:  6 comment:11 by strk, 12 years ago

Replying to robe:

yes it does. postgis_drop.sql.in.c and postgis_drop_before.sql.in.c are included for upgrade script.

Do we have the same for topology ? Or a ticket to do that ?

comment:12 by robe, 12 years ago

I think we might have a ticket already, but if not yes a ticket for that.

Raster already has that logic in its upgrade script since we had to do it because so much was being dropped/renamed etc. So i think its just topology that doesn't have that.

comment:13 by strk, 12 years ago

Milestone: PostGIS 2.0.0PostGIS 2.1.0

it'll take dump/reload to change anything about this, so either we're done or you want it for 2.1, right ?

Feel free to close if we're done.

comment:14 by robe, 12 years ago

Milestone: PostGIS 2.1.0PostGIS 2.0.0
Resolution: fixed
Status: newclosed

I think this is more or less done

Note: See TracTickets for help on using tickets.