Header And Logo

PostgreSQL
| The world's most advanced open source database.

catversion.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * catversion.h
00004  *    "Catalog version number" for PostgreSQL.
00005  *
00006  * The catalog version number is used to flag incompatible changes in
00007  * the PostgreSQL system catalogs.  Whenever anyone changes the format of
00008  * a system catalog relation, or adds, deletes, or modifies standard
00009  * catalog entries in such a way that an updated backend wouldn't work
00010  * with an old database (or vice versa), the catalog version number
00011  * should be changed.  The version number stored in pg_control by initdb
00012  * is checked against the version number compiled into the backend at
00013  * startup time, so that a backend can refuse to run in an incompatible
00014  * database.
00015  *
00016  * The point of this feature is to provide a finer grain of compatibility
00017  * checking than is possible from looking at the major version number
00018  * stored in PG_VERSION.  It shouldn't matter to end users, but during
00019  * development cycles we usually make quite a few incompatible changes
00020  * to the contents of the system catalogs, and we don't want to bump the
00021  * major version number for each one.  What we can do instead is bump
00022  * this internal version number.  This should save some grief for
00023  * developers who might otherwise waste time tracking down "bugs" that
00024  * are really just code-vs-database incompatibilities.
00025  *
00026  * The rule for developers is: if you commit a change that requires
00027  * an initdb, you should update the catalog version number (as well as
00028  * notifying the pghackers mailing list, which has been the informal
00029  * practice for a long time).
00030  *
00031  * The catalog version number is placed here since modifying files in
00032  * include/catalog is the most common kind of initdb-forcing change.
00033  * But it could be used to protect any kind of incompatible change in
00034  * database contents or layout, such as altering tuple headers.
00035  *
00036  *
00037  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00038  * Portions Copyright (c) 1994, Regents of the University of California
00039  *
00040  * src/include/catalog/catversion.h
00041  *
00042  *-------------------------------------------------------------------------
00043  */
00044 #ifndef CATVERSION_H
00045 #define CATVERSION_H
00046 
00047 /*
00048  * We could use anything we wanted for version numbers, but I recommend
00049  * following the "YYYYMMDDN" style often used for DNS zone serial numbers.
00050  * YYYYMMDD are the date of the change, and N is the number of the change
00051  * on that day.  (Hopefully we'll never commit ten independent sets of
00052  * catalog changes on the same day...)
00053  */
00054 
00055 /*                          yyyymmddN */
00056 #define CATALOG_VERSION_NO  201304271
00057 
00058 #endif