The version mechanism for PostgreSQL extensions is simple. Name it whatever you want and give it whatever alphanumeric version number that suits your fancy. Easy, eh? Just name the files with this format:
If you want to provide an upgrade path from one version of your extension to another, you would provide the file:
This simple mechanism allows PostgreSQL to update an extension that is already in place. Gone are the days of painful exporting and re-importing data just to change the definition of a data type. So, let's go ahead and update our example extension using the file
postal--1.0--1.1.sql. This update is as easy as:
ALTER EXTENSION postal UPDATE TO '1.1';
A note ...