Appendix C. Migrating from Version 1.3 to Version 1.4

Table of Contents

Upgrading a Database
Names Kept as Deprecated Aliases
Changed Signatures
Renamed Functions without an Alias
Removed Functions and Operators
Nearest Approach Distance to a Box
Functions of the Operators

Version 1.4 renames, re-signs, or removes SQL functions and operators of version 1.3. Most changes give MobilityDB one SQL dialect across PostgreSQL, DuckDB, Apache Spark, and Apache Flink, which name every function identically; the others correct a function that answered wrongly or remove one whose question is asked exactly by another function. This appendix lists every name of version 1.3 concerned and what replaces it.

Upgrading a Database

There is no update script from version 1.3 to version 1.4: a database moves by a dump of the version 1.3 database restored into a database with version 1.4. A dump writes the views, functions, indexes, and constraints of the user with the functions they call, so that every one of them calling a function that version 1.4 renames would fail to restore.

Version 1.4 therefore keeps, as deprecated aliases, the names of version 1.3 for the temporal, spatiotemporal, and network point types listed in the section called “Names Kept as Deprecated Aliases” and the section called “Changed Signatures”. Each answers as its replacement, carries a comment naming it, visible for instance with the command \df+ of psql, and is removed in version 1.5. A query or a view calling one of them works in version 1.4 and should be rewritten with its replacement before moving to version 1.5. The following queries list the deprecated functions of a database and the views calling them.

-- The deprecated functions and aggregates of the database
SELECT oid::regprocedure, obj_description(oid, 'pg_proc')
FROM pg_proc
WHERE obj_description(oid, 'pg_proc') LIKE 'Deprecated, removed in MobilityDB 1.5%'
ORDER BY 1;
-- The views that call one of them
SELECT DISTINCT v.oid::regclass AS view, p.oid::regprocedure AS deprecated
FROM pg_depend d
  JOIN pg_rewrite r ON r.oid = d.objid
  JOIN pg_class v ON v.oid = r.ev_class
  JOIN pg_proc p ON p.oid = d.refobjid
WHERE d.classid = 'pg_rewrite'::regclass AND d.refclassid = 'pg_proc'::regclass AND
  obj_description(p.oid, 'pg_proc') LIKE 'Deprecated, removed in MobilityDB 1.5%';