Version Number Function? - Mailing list pgsql-hackers

From David E. Wheeler
Subject Version Number Function?
Date
Msg-id 294EAAB0-9E42-448C-8962-641521AC8C4C@kineticode.com
Whole thread Raw
Responses Re: Version Number Function?
List 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



pgsql-hackers by date:

Previous
From: "Vladimir Sitnikov"
Date:
Subject: Buffer pool statistics in Explain Analyze
Next
From: Gregory Stark
Date:
Subject: Re: Buffer pool statistics in Explain Analyze