Ticket #961 (closed defect: fixed)

Opened 2 years ago

Last modified 15 months ago

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: trunk
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

  Changed 2 years ago by robe

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

already done for ST_ConcaveHull as well

  Changed 2 years ago by strk

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.

  Changed 2 years ago by robe

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.

  Changed 17 months ago by robe

done for ST_AsSVG at r8617 and r8618

  Changed 17 months ago by strk

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 ?

follow-up: ↓ 11   Changed 17 months ago by robe

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

  Changed 17 months ago by robe

r8629 ST_AsGML reduced

  Changed 17 months ago by robe

Done for ST_AsKML at r8638, r8639

  Changed 17 months ago by robe

Done for ST_AsGeoJSON at r8640

  Changed 17 months ago by robe

Done for ST_GeoHash at r8642

in reply to: ↑ 6   Changed 17 months ago by strk

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 ?

  Changed 17 months ago by robe

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.

  Changed 16 months ago by strk

  • milestone changed from PostGIS 2.0.0 to PostGIS 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.

  Changed 15 months ago by robe

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from PostGIS 2.1.0 to PostGIS 2.0.0

I think this is more or less done

Note: See TracTickets for help on using tickets.