> Joe Conway wrote:
>> #if (CATALOG_VERSION_NO <= 200211021)
>> #define PG_VERSION_73_COMPAT
>>
>> Since CATALOG_VERSION_NO doesn't change between major releases, it seems
>> to work pretty well.
That approach also has the nice property that it already works for all
releases back to 7.0, whereas
""Greg Sabino Mullane"" <[EMAIL PROTECTED]> wrote in message
> DBD::Pg uses "pg_config --version" and parses the output to set the
> version information before compiling. It finds pg_config by using
> PG envrironment variables, or looks in the path. Once running, it
> does a SELECT version() to fi
> This is what I currently have:
>
> #if (CATALOG_VERSION_NO <= 200211021)
> #define PG_VERSION_73_COMPAT
> #elif (CATALOG_VERSION_NO <= 200310211)
> #define PG_VERSION_74_COMPAT
> #else
> #define PG_VERSION_75_COMPAT
> #endif
>
> Since CATALOG_VERSION_NO doesn't change between major releases, it s
Tom Lane wrote:
Thomas Hallgren <[EMAIL PROTECTED]> writes:
PGSQL_MAJOR_VER := 7
PGSQL_MINOR_VER := 5
PGSQL_PATCH_VER := devel
VERSION := $(PGSQL_MAJOR_VER).$(PGSQL_MINOR_VER).$(PGSQL_PATCH_VER)
To be used in CPPFLAGS as: -DPGSQL_MAJOR_VER=$(PGSQL_MAJOR_VER) etc.
Wouldn't it be better to just put
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
DBD::Pg uses "pg_config --version" and parses the output to set the
version information before compiling. It finds pg_config by using
PG envrironment variables, or looks in the path. Once running, it
does a SELECT version() to find out what server
Tom Lane wrote:
Thomas Hallgren <[EMAIL PROTECTED]> writes:
The PGSQL_MAJOR_VER and PGSQL_MINOR_VER does not exist today. Ideally,
I'd like to find them in src/Makefile.global. Only thing present seems
to be the VERSION. I'd like to see something like:
PGSQL_MAJOR_VER := 7
PGSQL_MINOR_VER := 5
Thomas Hallgren <[EMAIL PROTECTED]> writes:
> The PGSQL_MAJOR_VER and PGSQL_MINOR_VER does not exist today. Ideally,
> I'd like to find them in src/Makefile.global. Only thing present seems
> to be the VERSION. I'd like to see something like:
> PGSQL_MAJOR_VER := 7
> PGSQL_MINOR_VER := 5
> PGSQL
I'd like to make a small suggestion that would enable external modules
to manage dependencies to PostgreSQL versions. Consider the following code:
#if PGSQL_MAJOR_VER > 7 || (PGSQL_MAJOR_VER == 7 && PGSQL_MINOR_VER > 4)
result = HeapTupleGetDatum(tuple);
#else
/* PostgreSQL 7.4 or earlier