Use of PG_VERSION

Started by Bruce Momjianover 16 years ago3 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Is there a reason tablespace.c::set_short_version() uses PG_VERSION, and
not the simpler PG_MAJORVERSION? initdb.c::get_short_version() does the
same thing.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: Use of PG_VERSION

Bruce Momjian <bruce@momjian.us> writes:

Is there a reason tablespace.c::set_short_version() uses PG_VERSION, and
not the simpler PG_MAJORVERSION? initdb.c::get_short_version() does the
same thing.

Probably that code predates the addition of the separate PG_MAJORVERSION
#define. +1 for simplifying. The change I just had to make in
backend/catalog/Makefile reinforces the thought that MAJORVERSION is
what we should be using in everyplace related to this type of check.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: Use of PG_VERSION

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Is there a reason tablespace.c::set_short_version() uses PG_VERSION, and
not the simpler PG_MAJORVERSION? initdb.c::get_short_version() does the
same thing.

Probably that code predates the addition of the separate PG_MAJORVERSION
#define. +1 for simplifying. The change I just had to make in
backend/catalog/Makefile reinforces the thought that MAJORVERSION is
what we should be using in everyplace related to this type of check.

Agreed. Fixed the attached, applied patch.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/rtmp/difftext/x-diffDownload+36-106