X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C911552A1B for ; Wed, 20 Jul 2005 14:50:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28773-03 for ; Wed, 20 Jul 2005 17:50:54 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 1FB6E52A2A for ; Wed, 20 Jul 2005 14:50:53 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j6KHonch016543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Jul 2005 11:50:51 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j6KHomVA044794; Wed, 20 Jul 2005 11:50:48 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j6KHol2p044793; Wed, 20 Jul 2005 11:50:47 -0600 (MDT) (envelope-from mfuhr) Date: Wed, 20 Jul 2005 11:50:47 -0600 From: Michael Fuhr To: "Jim C. Nasby" Cc: Tom Lane , Dario , Hannes Dorbath , pgsql-admin@postgresql.org Subject: Re: Determine PG version used for initdb Message-ID: <20050720175047.GA44720@winnie.fuhr.org> References: <15725.1121868322@sss.pgh.pa.us> <20050720155934.GS10127@decibel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050720155934.GS10127@decibel.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/165 X-Sequence-Number: 18221 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/