Re: Running CREATE only on certain Postgres versions

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: David Johnston <polobo(at)yahoo(dot)com>, Robert James <srobertjames(at)gmail(dot)com>, Igor Neyman <ineyman(at)perceptron(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Running CREATE only on certain Postgres versions
Date: 2012-09-25 15:25:41
Message-ID: CA+mi_8YH52bZasUwxCds6PaQDtfDcp1FMn6R3vj8P=bTbcGpSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 25, 2012 at 3:47 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2012-09-25 15:32:57 Re: unique constraint with significant nulls?
Previous Message Mike Blackwell 2012-09-25 15:05:15 unique constraint with significant nulls?