Re: Version Number Function?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Version Number Function?
Date: 2008-10-14 22:16:18
Message-ID: 3207C56B-90F0-4387-9102-87B24A49803D@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 14, 2008, at 14:50, Hannu Krosing wrote:

> Was current_setting('server_version') available in 8.1 ?

Yes. In 8.0, too.

>> There must be a way to get string_to_array() to evaluate only once,
>> yes?
>
> SELECT s.a[1]::int * 10000 + s.a[2]::int * 100 + s.a[3]::int
> FROM
> (SELECT string_to_array(current_setting('server_version'), '.') AS a)
> AS s;

Oh, duh. Even better!

Best,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-10-14 23:17:44 Re: db_user_namespace, md5 and changing passwords
Previous Message Stefan Kaltenbrunner 2008-10-14 22:02:24 Re: spoonbill is failing citext test