109 "old hstore format is not upward-compatible");
126 int buflen = (count) ?
HSE_ENDPOS(entries[2 * (count) - 1]) : 0;
144 for (
i = 1;
i < 2 * count; ++
i)
153 for (
i = 1;
i < count; ++
i)
176 int count = hs->
size_;
188 if (count > 0xFFFFFFF)
194 if (entries[0].pos != 0)
199 for (
i = 1;
i < count; ++
i)
201 if (entries[
i].keylen < entries[
i - 1].keylen)
211 for (
i = 0;
i < count; ++
i)
213 if (entries[
i].pos != lastpos)
216 + ((entries[
i].
valisnull) ? 0 : entries[
i].vallen));
249 if (hs->
size_ == 0 ||
260 if (!valid_old || hs->
size_ == 0)
273 elog(
ERROR,
"invalid hstore value found");
301#ifdef HSTORE_IS_HSTORE_NEW
302 elog(
WARNING,
"ambiguous hstore value resolved as hstore-new");
311 elog(
WARNING,
"ambiguous hstore value resolved as hstore-old");
319 int count = hs->
size_;
324 for (
i = 0;
i < count; ++
i)
#define PG_DETOAST_DATUM_COPY(datum)
#define PG_GETARG_DATUM(n)
#define PG_DETOAST_DATUM(datum)
#define PG_RETURN_INT32(x)
#define CALCDATASIZE(x, lenstr)
#define HS_FIXSIZE(hsp_, count_)
#define HS_FLAG_NEWVERSION
#define HSTORE_KEYLEN(arr_, i_)
#define HS_SETCOUNT(hsp_, c_)
PG_FUNCTION_INFO_V1(hstore_version_diag)
static int hstoreValidOldFormat(HStore *hs)
HStore * hstoreUpgrade(Datum orig)
StaticAssertDecl(sizeof(HOldEntry)==2 *sizeof(HEntry), "old hstore format is not upward-compatible")
Datum hstore_version_diag(PG_FUNCTION_ARGS)
static int hstoreValidNewFormat(HStore *hs)
static Pointer DatumGetPointer(Datum X)
static Size VARSIZE(const void *PTR)