Checking for Postgres < 7.3 - Mailing list pgsql-novice

From Stephen Quinney
Subject Checking for Postgres < 7.3
Date
Msg-id 20030724092420.GB4382@computing-services.oxford.ac.uk
Whole thread Raw
List pgsql-novice
Hi there,

I was wondering if there was an easy way to check if the running
Postgres has a version of less than 7.3? I'm aware that I can do
'SELECT version()' and get back the version string but it is not easy
to use that as a sub-select and then check if the version is less than
7.3. I could extract the number from the version string, the problem
is that the string sometimes has the number on its own but sometimes
has things like '7.2devel' which is not so easy to check as being
<7.3. Is just the numeric part of the version stored somewhere?

Thanks in advance,

Stephen Quinney



pgsql-novice by date:

Previous
From: "bruce"
Date:
Subject: Accessing Postgres db from apache using PHP
Next
From: William Yu
Date:
Subject: Re: Locking tables