Skip site navigation (1) Skip section navigation (2)

Re: Version defines

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James William Pye <flaw(at)rhid(dot)com>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Version defines
Date: 2004-10-31 15:02:01
Message-ID: 27557.1099234921@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
James William Pye <flaw(at)rhid(dot)com> writes:
> Would it be possible to get something along the lines of the attached
> patch in 8? (major,minor,patch,state version defines)

This has been proposed and rejected before, mainly on the grounds that
it would encourage bad programming practices.

At compile time, you should be checking the specific feature you care
about, not a system version number (this is pretty much the entire point
behind Autoconf).  At run time, you need to be making a run-time test
anyway; compiling against version x.y headers does not guarantee
anything about what version you will be executing against at runtime.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-10-31 15:15:01
Subject: Re: fsync, ext2 on Linux
Previous:From: Thomas HallgrenDate: 2004-10-31 14:38:32
Subject: Problems with pgxs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group