Re: [HACKERS] How to check the postgresql version

2004-11-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It's not quite the same, but check out the libpq function PQserverVersion, which returns the version in a standard 6-digit format, which can then be used to easily do numeric comparisons. Look for "sversion" in interfaces/libpq/fe-exec.c and PQserv

Re: [HACKERS] How to check the postgresql version

2004-11-21 Thread Thomas Hallgren
Joe Conway wrote: Along those lines, this is what I've been using in PL/R: #if (CATALOG_VERSION_NO <= 200211021) #define PG_VERSION_73_COMPAT #elif (CATALOG_VERSION_NO <= 200310211) #define PG_VERSION_74_COMPAT #else #define PG_VERSION_80_COMPAT #endif I wasn't following this thread earlier, but if

Re: [HACKERS] How to check the postgresql version

2004-11-21 Thread Joe Conway
Neil Conway wrote: Ruey-Lung Hsiao wrote: My problem is: I can't find a way to compare strings in C preprocessor directive since PG_VERSION is defined as something like "7.4.3" or "7.4.6". You could try using CATALOG_VERSION_NO in src/include/catversion.h as a substitute for the version number

Re: [HACKERS] How to check the postgresql version

2004-11-21 Thread Neil Conway
Ruey-Lung Hsiao wrote: My problem is: I can't find a way to compare strings in C preprocessor directive since PG_VERSION is defined as something like "7.4.3" or "7.4.6". You could try using CATALOG_VERSION_NO in src/include/catversion.h as a substitute for the version number. I think it would

[HACKERS] How to check the postgresql version

2004-11-20 Thread Ruey-Lung Hsiao
Hi, Sorry if this problem seems stupid but I would appreciate it if someone helps. I've been implementing several user-defined types and their corresponding GiST index in postgresql 7.4.3. They worked well. However, I have noticed there are several changes in SPI functions and their parame