pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wèi Cōngruì <crvv.mail@gmail.com>
Cc: fluca1978@gmail.com
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: select version() with internal number version?
Date: Thu, 09 Aug 2018 09:51:51 -0400
Message-ID: <26144.1533822711@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPxZtjHBtqVrcumktoxgS9acqshsM8NxVNPc7Tjm2E+oFCH4pw@mail.gmail.com>
References: <CAKoxK+6h4wsGUVV2AW8mbhsSoy+-=LheYeYLNLQTMFCkz5Ku_A@mail.gmail.com>
	<CAPxZtjHBtqVrcumktoxgS9acqshsM8NxVNPc7Tjm2E+oFCH4pw@mail.gmail.com>

=?UTF-8?B?V8OoaSBDxY1uZ3J1w6w=?= <crvv.mail@gmail.com> writes:
> On Thu, Aug 9, 2018 at 3:01 PM Luca Ferrari <fluca1978@gmail.com> wrote:
>> Is there any way to get directly the PostgreSQL version number?

> SHOW server_version;
> SHOW server_version_num;

Also, if you're using libpq, see PQserverVersion() which
(a) avoids a round trip to the server, and (b) works further back
than server_version_num, though that issue is probably academic
to most folk at this point (server_version_num appeared in 8.2).

			regards, tom lane




view thread (4+ messages)  latest in thread

Message-ID: <26144.1533822711@sss.pgh.pa.us>
Permalink:  ../26144.1533822711@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26144.1533822711@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, crvv.mail@gmail.com, fluca1978@gmail.com
  Subject: Re: select version() with internal number version?
  In-Reply-To: <26144.1533822711@sss.pgh.pa.us>
  References: <CAKoxK+6h4wsGUVV2AW8mbhsSoy+-=LheYeYLNLQTMFCkz5Ku_A@mail.gmail.com> <CAPxZtjHBtqVrcumktoxgS9acqshsM8NxVNPc7Tjm2E+oFCH4pw@mail.gmail.com> <26144.1533822711@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox