473,854 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What Version Installed?

Hi All,
How can I determine what version of postgresql is installed. Can't find
answer in archives.
thanks,
Phil
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #1
6 31583
Hi:

El jue, 15-01-2004 a las 16:56, Phil Campaigne escribió:
Hi All,
How can I determine what version of postgresql is installed. Can't find
answer in archives.
thanks,

SELECT version();
--
Saludos

Roberto Andrade Fonseca
Microsoft Certified Solitaire Player
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #2
Roberto Andrade Fonseca wrote:
El jue, 15-01-2004 a las 16:56, Phil Campaigne escribió:
Hi All,
How can I determine what version of postgresql is installed.


SELECT version();


What's the function or purpose of the file "PG_VERSION " in $PGDATADIR?

In my case, /var/lib/postgres/data/PG_VERSION contains "7.3"

Is this the version of PostgreSQL that created the database?

Alex Satrapa
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #3
pc********@char ter.net (Phil Campaigne) writes:
How can I determine what version of postgresql is installed. Can't
find answer in archives.


How to determine the version is well documented here...
<http://www.postgresql. org/docs/current/interactive/functions-misc.html>
--
let name="cbbrowne" and tld="libertyrms .info" in String.concat "@" [name;tld];;
<http://dev6.int.libert yrms.com/>
Christopher Browne
(416) 646 3304 x124 (land)
Nov 22 '05 #4
There are several answers to this.

If you use a package manager like rpm (e.g., RedHat, SuSE, Mandrake),
try:

tallac$ rpm -q postgresql
postgresql-7.3.4-3.rhl9

Most (all?) binaries take a the standard-ish --version flag, like this:

tallac$ initdb --version
initdb (PostgreSQL) 7.4.1
tallac$ postmaster --version
postmaster (PostgreSQL) 7.4.1

You'll notice that I've got two versions installed, so be careful about
knowing which ones you're actually using. (BTW, I don't usually have two
versions installed and doing so probably isn't a good idea for most
people, but I happened to need 7.3.4's psql client briefly.)

Finally, you can ask the server you're talking to:

tallac$ psql -UPUBLIC -c 'select version()'
version
-------------------------------------------------------------
PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC 2.96
-Reece
--
Reece Hart, Ph.D. rk*@gene.com, http://www.gene.com/
Genentech, Inc. 650/225-6133 (voice), -5389 (fax)
Bioinformatics and Protein Engineering
1 DNA Way, MS-93 http://www.in-machina.com/~reece/
South San Francisco, CA 94080-4990 re***@in-machina.com, GPG: 0x25EC91A0

Nov 22 '05 #5
That's the file the backend uses to determine whether the directory it's
looking at is:

a) an initdb'd location
b) initdb'd with the right version

It bears no relation to your actual installed binaries though.

On Fri, Jan 16, 2004 at 10:32:24AM +1100, Alex Satrapa wrote:
Roberto Andrade Fonseca wrote:
El jue, 15-01-2004 a las 16:56, Phil Campaigne escribió:
Hi All,
How can I determine what version of postgresql is installed.
SELECT version();


What's the function or purpose of the file "PG_VERSION " in $PGDATADIR?

In my case, /var/lib/postgres/data/PG_VERSION contains "7.3"

Is this the version of PostgreSQL that created the database?

Alex Satrapa


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


--
Martijn van Oosterhout <kl*****@svana. org> http://svana.org/kleptog/ (... have gone from d-i being barely usable even by its developers
anywhere, to being about 20% done. Sweet. And the last 80% usually takes
20% of the time, too, right?) -- Anthony Towns, debian-devel-announce


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAB3FLY5T wig3Ge+YRAhaVAJ 9iowkY99oSGg4Bl X0mfzYo5xslNgCf dJko
PhISr4e5QpAYMLl LqgTUS08=
=pkHs
-----END PGP SIGNATURE-----

Nov 22 '05 #6
There are several answers to this.

If you use a package manager like rpm (e.g., RedHat, SuSE, Mandrake),
try:

tallac$ rpm -q postgresql
postgresql-7.3.4-3.rhl9

Most (all?) binaries take a the standard-ish --version flag, like this:

tallac$ initdb --version
initdb (PostgreSQL) 7.4.1
tallac$ postmaster --version
postmaster (PostgreSQL) 7.4.1

You'll notice that I've got two versions installed, so be careful about
knowing which ones you're actually using. (BTW, I don't usually have two
versions installed and doing so probably isn't a good idea for most
people, but I happened to need 7.3.4's psql client briefly.)

Finally, you can ask the server you're talking to:

tallac$ psql -UPUBLIC -c 'select version()'
version
-------------------------------------------------------------
PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC 2.96
-Reece
--
Reece Hart, Ph.D. rk*@gene.com, http://www.gene.com/
Genentech, Inc. 650/225-6133 (voice), -5389 (fax)
Bioinformatics and Protein Engineering
1 DNA Way, MS-93 http://www.in-machina.com/~reece/
South San Francisco, CA 94080-4990 re***@in-machina.com, GPG: 0x25EC91A0

Nov 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3078
by: wylbur37 | last post by:
How do you find out what version of JavaScript your browser supports? Is there a JavaScript function that will tell you? __________________________________ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003
5
1371
by: Tom | last post by:
Hi all, i just wanted to ask how i could find out what version of .net i have installed on my computer. I just purchased a laptop off a firend and he already has it installed. thx
0
1761
by: JDP | last post by:
How do I tell what version of Crystal is being used in VS .Net? Is there a way to tell what version my report was created in? Details: During the installation of VS 2003 we were prompted and accepted installation of Crystal Reports. When we start the 9.0 or 8.5 installation crw32.dll we get an invalid keycode.dll dialog and the program quits.
2
630
by: j.b.messina | last post by:
This has not yet been published by Microsoft. It will be published within the next few weeks, mainly because I asked them to. I felt this was information badly needed, and I think this is the best group to share this information. A co-worker and I were able to determine how to tell exactly what version of .NET Framework is installed. We had to do this because we had to manually deploy the MS05-004 Security Bulletin to thousands of...
1
2943
by: Flack | last post by:
Hey guys, Can someone tell me or show me how I can programatically discover what version of Excel a machine has installed, or if the machine has Excel installed at all? If anyone has some sample code that would be great. Thanks
5
5656
by: Dixie | last post by:
How can I tell what version of jet a computer is running? dixie
9
19719
by: Rico | last post by:
Hello, I have an application which I'd like to determine if SQL Server is installed, and if so, what version. Is there any way to do this outside of error trapping? Thanks! Rick
1
10294
by: bishweshwar | last post by:
i was not able to get the command ( unix ) to know the iplanet version installed. can someone help me out in this.
14
2044
by: Charlie | last post by:
I am a single developer, and new to SQL Server. I have Windows XP Pro, and my system has a couple gigs RAM. I would like to know what version of SQL Server I should buy. Any advice is appreciated.
0
9901
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11031
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9518
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4563
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4162
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.