Re: querying the version of libpq

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: querying the version of libpq
Date: 2010-10-05 20:41:49
Message-ID: AANLkTinYeZd2CgRsxgdbi+aWHst5_ydXxQh-SrE8x+du@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hey all,

Could you call it as PQlibVersion() or even PQversion() instead of
PQlibpqVersion() ?

2010/10/5 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com> writes:
> > On 5 October 2010 16:33, Greg Sabino Mullane <greg(at)turnstep(dot)com> wrote:
> >>> How does the driver figure it out?
> >>
> >> DBD::Pg parses pg_config --version, then passes the information
> >> to the C programs for directive fiddling. I certainly hope
> >> other drivers are doing the same, as libpq varies across
> >> major versions a good deal.
>
> > I would imagine that most libpq wrapping drivers use libpq's
> > PQserverVersion(), which returns an integer that looks like 90000.
>
> The real problem is that neither of these can be trusted to tell you the
> *library* version. PQserverVersion() is something else altogether,
> and I wouldn't want to assume that pg_config exactly matches the library
> you're linked to --- if it's even present at all.
>
> We could add a PQlibpqVersion(), maybe, but it would be many years
> before client code could rely on that being present.
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
// Dmitriy.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2010-10-05 20:44:48 Re: querying the version of libpq
Previous Message Greg Sabino Mullane 2010-10-05 20:39:41 Re: querying the version of libpq

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-10-05 20:43:20 Re: Issues with Quorum Commit
Previous Message Greg Sabino Mullane 2010-10-05 20:39:41 Re: querying the version of libpq