+support for BigInt(int8) datatype in postgres, closes #384
This commit is contained in:
parent
5e839b97a8
commit
d6cf82efb0
2 changed files with 13 additions and 0 deletions
|
@ -46,6 +46,14 @@ namespace mapnik
|
|||
(((boost::uint32_t) ((boost::uint8_t) (A)[1])) << 16) | \
|
||||
(((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;
|
||||
#define float8net(V,M) do { double def_temp; \
|
||||
|
|
|
@ -125,6 +125,11 @@ feature_ptr postgis_featureset::next()
|
|||
int val = int2net(buf);
|
||||
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
|
||||
{
|
||||
float val;
|
||||
|
|
Loading…
Reference in a new issue