Re: Finding the pqlib version

Поиск
Список
Период
Сортировка
От Christoph Zwerschke
Тема Re: Finding the pqlib version
Дата
Msg-id 43EE0AD2.1050701@online.de
обсуждение исходный текст
Ответ на Re: Finding the pqlib version  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-interfaces
Bruce Momjian wrote:
> You want the server version.  In PostgreSQL 8.0 and later you can use
> libpq's PQserverVersion(), but for pre-8.0, I think you have to do
> SELECT version(), and parse that:

I'd prefer something defined in the Postgres include files that can be 
checked by the precompiler already. In Python, the version information 
with major, minor and micro is defined in patchlevel.h and can be used 
for conditional compilation. It would be nice if something like this 
existed also for Postgres. I noticed pg_config.h has PG_VERSION, but it 
is the compound version of major, minor and micro including the dots 
which cannot be easily compared.

-- Christoph


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Christoph Zwerschke
Дата:
Сообщение: Re: Finding the pqlib version
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Finding the pqlib version