Version Number Function?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Version Number Function?
Date: 2008-10-11 23:52:13
Message-ID: 294EAAB0-9E42-448C-8962-641521AC8C4C@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Howdy,

Any interest in adding a function like this to core?

Datum
pg_version(PG_FUNCTION_ARGS)
{
PG_RETURN_INT32(PG_VERSION_NUM);
}

That returns an integer, such as

try=# select pg_version();
pg_version
------------
80304
(1 row)

I've whipped this up for pgtap, as it'll be useful for determing when
to skip tests based on a version of PostgreSQL, but I thought it might
be generally useful enough to add to core.

Thoughts?

Best,

David

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-10-12 00:26:29 Re: Buffer pool statistics in Explain Analyze
Previous Message Vladimir Sitnikov 2008-10-11 23:24:39 Buffer pool statistics in Explain Analyze