Re: [GENERAL] Backward compatibility - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Backward compatibility
Date
Msg-id CAKFQuwaNm8Su+UZj85wLrd4D5k=ys1-aF5k4mtmHLS_UYovL8Q@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Backward compatibility  (Igor Korot <ikorot01@gmail.com>)
Responses Re: [GENERAL] Backward compatibility  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
On Thu, Jul 20, 2017 at 7:13 PM, Igor Korot <ikorot01@gmail.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


see the below for other ways to query the setting.



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.​

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: [GENERAL] Backward compatibility
Next
From: Igor Korot
Date:
Subject: Re: [GENERAL] Backward compatibility