Ticket #1630 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

upgrade from alpha6 to beta1: wktgeomval type can't be dropped; cannot change input parameter nodata; can't drop raster_columns

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: build/upgrade/install Version: trunk
Keywords: Cc:

Description

cannot drop because extension depends on it.

Change History

Changed 15 months ago by robe

  • summary changed from extension upgrade from alpha6 to alpha7SVN -wktgeomval type can't be dropped to upgrade from alpha6 to alpha7SVN -wktgeomval type can't be dropped

This I think affects all upgrades from alpha6 and prior.

fixed 2 issues at r9342, r9341 -- still one more because someone renamed an arg and didn't add to the drop list.

So have the cannot change input parameter nodata

before I can close this out.

Changed 15 months ago by strk

Are you planning to fix this yourself robe ? Or name the function with argument changed for someone else to fix.

Changed 15 months ago by robe

strk -- actually if you could do it that would be great. I suspect its a function Pierre did but can't remember the one he did last and not near my compiler to even test. I would like this to happen before Paul calls his beta. I assume the fact I called it a blocker will prevent him from going trigger happy :)

Changed 15 months ago by strk

  • summary changed from upgrade from alpha6 to alpha7SVN -wktgeomval type can't be dropped to upgrade from alpha6 to alpha7SVN: wktgeomval type can't be dropped; cannot change input parameter nodata

Changed 15 months ago by strk

  • owner changed from robe to strk
  • status changed from new to assigned

Seems to be this:

 -- Major variant
-CREATE OR REPLACE FUNCTION st_clip(rast raster, band int, geom geometry, nodata float8[] DEFAULT NULL, trimraster boolean DEFAULT FALSE)
+CREATE OR REPLACE FUNCTION st_clip(rast raster, band int, geom geometry, nodataval double precision[] DEFAULT NULL, crop boolean DEFAULT TRUE)

Which is Pierre's at r9336

Changed 15 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

r9350 fixes the missing DROP, exposing next issue, which I'd file a separate bug for

Changed 15 months ago by strk

I guess r9350 was dropping the wrong function. r9351 seems to do it.

Changed 15 months ago by pracine

Sorry about that. Thanks strk.

Changed 15 months ago by robe

  • status changed from closed to reopened
  • resolution fixed deleted

I'm afraid there is still an issue here, but not sure if it's an issue going from alpha6. I just tried upgrading an alpha5 to beta1 with extensions and get this:

Cannot change name of input parameter "nodata". Use Drop function.

Changed 15 months ago by pracine

I guess the nodata array versions are missing in rtpostgis_drop.sql.in.c:

DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8[], boolean);
DROP FUNCTION IF EXISTS st_clip(raster, int, geometry, float8[], boolean);

Would that do the job?

Changed 15 months ago by robe

  • summary changed from upgrade from alpha6 to alpha7SVN: wktgeomval type can't be dropped; cannot change input parameter nodata to upgrade from alpha6 to beta1: wktgeomval type can't be dropped; cannot change input parameter nodata; can't drop raster_columns

Well this is mighty annoying. My luck for not having time to test the final beta1. Just tried to upgrade my freshly installed alpha6 to beta1 and got --

Can't drop raster_columns because other objects depend on it. extensions postgis depends on it.

Changed 15 months ago by robe

Okay I think I fixed the drop raster_columns / wktgeomval issue in r9382. Not sure why I didn't run into this before. I thought I tested it earlier on.

Anyrate I suspect this is a bug in the extension model itself since to fix I had to drop sideline types created by the postgresql system which we didn't explicitly create but depend on things we did create. Seems silly to me it doesn't drop them as part of the ALTER EXTENSION .. DROP VIEW , DROP TYPE process. I'll report upstream to confirm

Changed 15 months ago by robe

make that r9382 and r9383

Changed 15 months ago by robe

More fixes at r9384. After that my upgrade from alpah6 to beta1 works. But I cheated and hand-coded so will confirm later.

Changed 15 months ago by robe

  • status changed from reopened to closed
  • resolution set to fixed

Seems to work.

Note: See TracTickets for help on using tickets.