+support for BigInt(int8) datatype in postgres, closes #384

This commit is contained in:
Dane Springmeyer 2009-07-17 04:30:11 +00:00
parent 5e839b97a8
commit d6cf82efb0
2 changed files with 13 additions and 0 deletions

View file

@ -46,6 +46,14 @@ namespace mapnik
(((boost::uint32_t) ((boost::uint8_t) (A)[1])) << 16) | \ (((boost::uint32_t) ((boost::uint8_t) (A)[1])) << 16) | \
(((boost::uint32_t) ((boost::uint8_t) (A)[0])) << 24)) (((boost::uint32_t) ((boost::uint8_t) (A)[0])) << 24))
#define int8net(A) (int64_t) (((boost::uint64_t) ((boost::uint8_t) (A)[7])) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[6])) << 8) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[5])) << 16) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[4])) << 24) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[3])) << 32) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[2])) << 40) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[1])) << 48) | \
(((boost::uint64_t) ((boost::uint8_t) (A)[0])) << 56))
typedef boost::uint8_t byte; typedef boost::uint8_t byte;
#define float8net(V,M) do { double def_temp; \ #define float8net(V,M) do { double def_temp; \

View file

@ -125,6 +125,11 @@ feature_ptr postgis_featureset::next()
int val = int2net(buf); int val = int2net(buf);
boost::put(*feature,name,val); boost::put(*feature,name,val);
} }
else if (oid==20) //int8/BigInt
{
int val = int8net(buf);
boost::put(*feature,name,val);
}
else if (oid == 700) // float4 else if (oid == 700) // float4
{ {
float val; float val;