Checking for Postgres < 7.3

From: Stephen Quinney <stephen(dot)quinney(at)computing-services(dot)oxford(dot)ac(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Checking for Postgres < 7.3
Date: 2003-07-24 09:24:20
Message-ID: 20030724092420.GB4382@computing-services.oxford.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-novice by date

  From Date Subject
Next Message papapep 2003-07-24 11:30:13 Questions about Exists-Not exists clause
Previous Message Wolfgang Drotschmann 2003-07-24 05:57:19 Re: CREATE TYPE with array