Re: Running CREATE only on certain Postgres versions - Mailing list pgsql-general

From Daniele Varrazzo
Subject Re: Running CREATE only on certain Postgres versions
Date
Msg-id CA+mi_8YH52bZasUwxCds6PaQDtfDcp1FMn6R3vj8P=bTbcGpSw@mail.gmail.com
Whole thread Raw
In response to Re: Running CREATE only on certain Postgres versions  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: Running CREATE only on certain Postgres versions
Re: Running CREATE only on certain Postgres versions
List pgsql-general
On Tue, Sep 25, 2012 at 3:47 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:

> To elaborate:
> test=> SELECT current_setting('server_version_num');
>  current_setting
> -----------------
>  90009

Yes, but knowing that, how does he run a statement only if version
e.g. >= 80400? Is there a better way than the proposed
create/call/drop function before PG 9.0? (since 9.0 there is the DO
statement).

-- Daniele


pgsql-general by date:

Previous
From: Mike Blackwell
Date:
Subject: unique constraint with significant nulls?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: unique constraint with significant nulls?