140 size_t sz1 = VARSIZE(g1);
141 size_t bsz1 = sz1 - hsz1;
144 size_t bsz2 = bsz1 +
sizeof(int);
147 memcpy(b2, &srid,
sizeof(
int));
149 memcpy(b2+
sizeof(
int), b1, bsz1);
151 hval = hash_any(b2, bsz2);
153 PG_FREE_IF_COPY(g1, 0);
154 PG_RETURN_DATUM(hval);
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
uint32_t gserialized_header_size(const GSERIALIZED *gser)
Returns the size in bytes of the header, from the start of the object up to the type number.