Re: Determine PG version used for initdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux