Re: 20th anniversary of PostgreSQL ?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Julyanto Sutandang <julyanto(at)equnix(dot)co(dot)id>, Mike Toews <mwtoews(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, damien clochard <damien(at)dalibo(dot)info>, PostgreSQL Advocacy <pgsql-advocacy(at)postgresql(dot)org>
Subject: Re: 20th anniversary of PostgreSQL ?
Date: 2015-04-08 19:39:42
Message-ID: 20150408193942.GC22803@momjian.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

On Wed, Apr 8, 2015 at 09:31:15PM +0200, Magnus Hagander wrote:
> On Wed, Apr 8, 2015 at 9:28 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> On Wed, Apr  8, 2015 at 09:45:05AM +0200, Magnus Hagander wrote:
> > On Wed, Apr 8, 2015 at 9:38 AM, julyanto SUTANDANG <julyanto(at)equnix(dot)co(dot)id
> >
> > wrote:
> >
> >     I thought that were no Postgres 1.0 since Postgres is continuing
> Ingres,
> >     then Postgres95.
> >     Postgres started from version 6.0 to give credit of the past
> development 
> >
> >
> > PostgreSQL started from version 6.0.
> > Postgres95 started from version 1.0 (though we can pretend it was 5.0)
> > POSTGRES had at least versions 4.x. 4.2 was the last release.
>
> Actually, I think Postgres95 had "5.X" in its $PGDATA/PG_VERSION, which
> forced us to start PostgreSQL at 6.0, in case any applications were
> looking there for version information.
>
>
> Oh really? That's even more confusing than I thought, and I thought it was
> pretty bad :)  

Yes. When they numbered Postgres95 as 1.0, they changed PG_VERSION from
4.X to 5.X, not to 1.X, as you would have assumed. Here is proof from
Postgres95 1.01's miscadmin.h:

/*****************************************************************************
* magic.h - definitions of the indexes of the magic numbers *
*****************************************************************************/

#define PG_RELEASE 5
#define PG_VERSION 1
#define PG_VERFILE "PG_VERSION"

and this function to create the PG_VERSION file:

/*
* SetPgVersion - writes the version to a database directory
*/
void
SetPgVersion(char *path)
{
int fd;
char version[4], buf[MAXPGPATH+1];

PathSetVersionFilePath(path, buf);

if ((fd = open(buf, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
elog(FATAL, "SetPgVersion: %s: %m", buf);

version[0] = '0' + PG_RELEASE;
version[1] = '.';
version[2] = '0' + PG_VERSION;
version[3] = '\n';
if (write(fd, version, 4) != 4)
elog(WARN, "SetPgVersion: %s: %m", buf);

close(fd);
}

so the Postgres95 1.01 PG_VERSION file contained 5.1.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message gabrielle 2015-04-28 00:28:29 Re: OSCON 2015 Booth/BoF
Previous Message Magnus Hagander 2015-04-08 19:31:15 Re: 20th anniversary of PostgreSQL ?