Opened 9 years ago

Last modified 15 months ago

#3373 new enhancement

ALTER DOMAIN missing from topology_upgrade

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS Fund Me
Component: topology Version: master
Keywords: upgrade Cc:

Description (last modified by strk)

I just noticed that the ALTER DOMAIN statements in topology.sql.in (meant to do upgrades) are not being present in the topology_upgrade.sql script, meaning domain constraints are not properly upgraded.

Changing to an enhancement request.

Change History (11)

comment:1 by strk, 9 years ago

I see ALTER lines are explicitly removed from the SQL file for the purpose of creating the upgrade script, but dont' understand why. Digging back in history I found r8157 being the commit that introduced the rule to create the upgrade script, by Regina in November 2011.

Regina, where did you copy that from ? Why an ALTER is also condidered something that cannot be present in an upgrade ? The comment above that snippet says:

+#Generate upgrade script by stripping things that can't be reinstalled
+#e.g. don't bother with tables, types, triggers, and domains

comment:2 by strk, 9 years ago

Ok one reason to strip the ALTER is that some of the ALTERs in there are for adding constraints, and fail if the constraint already exists. I guess the topology script could be changed to account for that, or otherwise it would be impossible for an upgrade to add or drop a constraint…

DROP .. IF EXISTS .. is only available starting with PostgreSQL 9.2 though

comment:3 by strk, 9 years ago

Description: modified (diff)
Milestone: PostGIS 2.2.1PostGIS 2.3.0
Type: defectenhancement
Version: 2.2.xtrunk

I guess it is time to generate the topology upgrade via our postgis_proc_upgrade.pl, and add there logic to handle changes in constraints set attached to domains.

comment:4 by robe, 8 years ago

done this yet, or should we punt to 2.4?

comment:5 by robe, 8 years ago

Milestone: PostGIS 2.3.0PostGIS 2.4.0

comment:6 by robe, 7 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0

comment:7 by robe, 6 years ago

Milestone: PostGIS 2.5.0PostGIS 3.0.0

comment:8 by robe, 5 years ago

Milestone: PostGIS 3.0.0PostGIS 3.1.0

comment:9 by pramsey, 4 years ago

Milestone: PostGIS 3.1.0PostGIS Fund Me

comment:10 by strk, 15 months ago

Keywords: upgrade added

See also #5345 for missing new CASTs

comment:11 by strk, 15 months ago

The topology_upgrade.sql script is now handled by create_upgrade.pl utility. The utility still does not do DOMAIN so this issue is still valid

Note: See TracTickets for help on using tickets.