Re: Backward compatibility

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backward compatibility
Date: 2017-07-21 02:46:05
Message-ID: CA+FnnTwXEQzo1c0mKRa1y7KjSvTuj-cNcnmss5C-Qi4AgZJ6MA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ALso, I presume there is no special libpg function, right?

Thank you.

On Thu, Jul 20, 2017 at 10:44 PM, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
> Hi, David,
>
> On Thu, Jul 20, 2017 at 10:23 PM, David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>> On Thu, Jul 20, 2017 at 7:13 PM, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>>>
>>> Hi, ALL,
>>> According to the documentation PostgreSQL 9.6 (latest) supports
>>>
>>> CREATE INDEX IF NOT EXIST
>>>
>>> However, the version 9.4 and below supports only
>>>
>>> CREATE INDEX.
>>>
>>> Is there a query or a libpg function which can return the version of
>>> the server I'm running?
>>
>>
>> SHOW server_version_num; -- this is better than "version()" since you don't
>> have to parse text
>>
>> https://www.postgresql.org/docs/9.6/static/runtime-config-preset.html#GUC-SERVER-VERSION-NUM
>
> draft=# SHOW server_version_num;
> server_version_num
> --------------------
> 90124
> (1 row)
>
> Is there a way to get a version_major, version_minr and version_extra?
>
> Thank you.
>
>>
>> see the below for other ways to query the setting.
>>
>> https://www.postgresql.org/docs/9.6/static/config-setting.html#CONFIG-SETTING-SQL-COMMAND-INTERACTION
>>
>>>
>>> And in the latter case - is there a way to check if the index exist?
>>>
>>> I guess I will have to query "information_schema" again...
>>>
>>
>> Yep, not much demand for multiple ways to do the same thing in this area...
>>
>> David J.
>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-07-21 02:51:53 Re: Backward compatibility
Previous Message Igor Korot 2017-07-21 02:44:14 Re: Backward compatibility