[10772] Fixed build for different PostgreSQL version at diff platforms.

* Fixed Problem in different place define OID enums.
  Enums hardcoded in mangos code now as done for many other projects using PostgreSQL

* Other PostgreSQL detection fixes.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
narma 2010-11-22 01:59:38 +03:00 committed by VladimirMangos
parent 1b1d5c1001
commit 06b382abb9
4 changed files with 110 additions and 12 deletions

View file

@ -25,8 +25,50 @@
#include <postgre/libpq-fe.h>
#include <postgre/pg_type.h>
#else
// Define OID's from pg_type.h in postgresql server includes.
#define BOOLOID 16
#define BYTEAOID 17
#define CHAROID 18
#define NAMEOID 19
#define INT8OID 20
#define INT2OID 21
#define INT2VECTOROID 22
#define INT4OID 23
#define REGPROCOID 24
#define TEXTOID 25
#define OIDOID 26
#define TIDOID 27
#define XIDOID 28
#define CIDOID 29
#define OIDVECTOROID 30
#define POINTOID 600
#define LSEGOID 601
#define PATHOID 602
#define BOXOID 603
#define POLYGONOID 604
#define LINEOID 628
#define FLOAT4OID 700
#define FLOAT8OID 701
#define ABSTIMEOID 702
#define RELTIMEOID 703
#define TINTERVALOID 704
#define UNKNOWNOID 705
#define CIRCLEOID 718
#define CASHOID 790
#define INETOID 869
#define CIDROID 650
#define BPCHAROID 1042
#define VARCHAROID 1043
#define DATEOID 1082
#define TIMEOID 1083
#define TIMESTAMPOID 1114
#define TIMESTAMPTZOID 1184
#define INTERVALOID 1186
#define TIMETZOID 1266
#define BITOID 1560
#define VARBITOID 1562
#define NUMERICOID 1700
#include <libpq-fe.h>
//#include <pg_type.h>
#endif
class QueryResultPostgre : public QueryResult