Opened 13 years ago

Closed 13 years ago

#1606 closed defect (fixed)

upgrade script failure: error can not change name of input parameter "new_srid"

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 2.0.0
Component: build Version: master
Keywords: Cc:

Description

Get this error when trying to upgrade from alpha5 to alpha6 using

ALTER EXTENSION postgis UPDATE TO "2.0.0alpha6";

Haven't checked if similar issue with regular upgrade.

Attachments (1)

restore_par_name_UpdateGeometrySRID.patch (3.4 KB ) - added by mwtoews 13 years ago.
fix-up from #1596

Download all attachments as: .zip

Change History (7)

comment:1 by robe, 13 years ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to strk
Summary: error can not change name of input parameter "new_srid"upgrade script failure: error can not change name of input parameter "new_srid"

Same issue with 9.0 build

I think its this function — we need to drop it first as part of upgrade

CREATE OR REPLACE FUNCTION UpdateGeometrySRID(catalogn_name varchar,schema_name varchar,table_name varchar,column_name varchar,new_srid_in integer)

comment:2 by mwtoews, 13 years ago

This error stemmed from #1596. The last parameter in UpdateGeometrySRID, new_srid, was renamed to new_srid_in. The rational was to somewhat mimic AddGeometryColumn. This can be modified back, if required. (Another internal variable name like new_srid_mod would need to be used within UpdateGeometrySRID, since the IN parameters are CONST and this var may change to unknown_srid).

by mwtoews, 13 years ago

fix-up from #1596

comment:3 by mwtoews, 13 years ago

If it is preferred to keep the old parameter names, use the attached patch.

comment:4 by strk, 13 years ago

This is the kind of regression our testsuite would hardly ever get

comment:5 by strk, 13 years ago

Changing again would mean that the upgrade will fail for anyone going from alpha6 to alpha7, but those going from alpha5 to alpha7 would be fine.

Better go with the drop, probably.

comment:6 by strk, 13 years ago

Resolution: fixed
Status: newclosed

Fixed with r9275

Note: See TracTickets for help on using tickets.