Let's consider the sample database used throughout this book and make an extension called pg11ssp. The first version of the extension, version 1.0, will define the data structure (the tables and constraints) and a few functions. Let's start with the script file, which is partially shown in Listing 3. As you can see, it is a plain SQL set of statements:
CREATE TABLE IF NOT EXISTS files ( ... ); CREATE TABLE IF NOT EXISTS tags( ... ); CREATE TABLE IF NOT EXISTS j_files_tags ( ... );
Let's now consider the control file. This must set default_version to the smallest version number available, which, in this case, is 1.0. Moreover, to make things simpler, we can have the script file ...