X-Git-Url: http://www.sigaev.ru/git/gitweb.cgi?p=hstore.git;a=blobdiff_plain;f=hstore.h;fp=hstore.h;h=0000000000000000000000000000000000000000;hp=5fb5999610378f533bdb572da19d196a2e9b2285;hb=77af220c462dd61507d6cca9b9f54ad3e102e1b6;hpb=2ebb5a0f24c70e3b6ee5ac7401eb28f804d01817 diff --git a/hstore.h b/hstore.h deleted file mode 100644 index 5fb5999..0000000 --- a/hstore.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __HSTORE_H__ -#define __HSTORE_H__ - -#include "postgres.h" -#include "funcapi.h" -#include "access/gist.h" -#include "access/itup.h" -#include "utils/elog.h" -#include "utils/palloc.h" -#include "utils/builtins.h" -#include "storage/bufpage.h" - - -typedef struct { - uint16 keylen; - uint16 vallen; - uint32 - valisnull:1, - pos:31; -} HEntry; - - -typedef struct { - int4 len; - int4 size; - char data[1]; -} HStore; - -#define HSHRDSIZE (2*sizeof(int4)) -#define CALCDATASIZE(x, lenstr) ( (x) * sizeof(HEntry) + HSHRDSIZE + (lenstr) ) -#define ARRPTR(x) ( (HEntry*) ( (char*)(x) + HSHRDSIZE ) ) -#define STRPTR(x) ( (char*)(x) + HSHRDSIZE + ( sizeof(HEntry) * ((HStore*)x)->size ) ) - - -#define PG_GETARG_HS(x) ((HStore*)PG_DETOAST_DATUM(PG_GETARG_DATUM(x))) - -typedef struct { - char *key; - char *val; - uint16 keylen; - uint16 vallen; - bool isnull; - bool needfree; -} Pairs; - -int comparePairs(const void *a, const void *b); -int uniquePairs(Pairs * a, int4 l, int4 *buflen); - -#endif