Re: Determine PG version used for initdb - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Determine PG version used for initdb
Date
Msg-id 20050720175047.GA44720@winnie.fuhr.org
Whole thread Raw
In response to Re: Determine PG version used for initdb  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-admin
On Wed, Jul 20, 2005 at 10:59:34AM -0500, Jim C. Nasby wrote:
>
> Hrm. Is there no definative way to determine what version of initdb was
> used on a cluster? ISTM that would be a useful feature to have.

The query I posted in another message appears to work in 7.4 and
later (i.e., versions that have the Information Schema):

SELECT character_value
FROM information_schema.sql_implementation_info
WHERE implementation_info_name = 'DBMS VERSION';

Unless I'm misreading what set_info_version() and setup_schema()
do in initdb.c, the above query will return a value based on the
value of PG_VERSION that was current when the initdb that initialized
the cluster was built.  Although that raises a question: is that
the desired behavior, or should 'DBMS VERSION' return the version
currently running?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-admin by date:

Previous
From: Chris Travers
Date:
Subject: Re: caching table/query
Next
From: Alexander Stanier
Date:
Subject: FATAL: could not read statistics message