fix ginstentryinit() macro for 8.2
authorteodor <teodor>
Wed, 23 Aug 2006 09:13:16 +0000 (09:13 +0000)
committerteodor <teodor>
Wed, 23 Aug 2006 09:13:16 +0000 (09:13 +0000)
hstore_gist.c

index f6ecc78..cb9cfae 100644 (file)
@@ -137,7 +137,11 @@ ghstore_compress(PG_FUNCTION_ARGS) {
                retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
                gistentryinit(*retval, PointerGetDatum(res),
                                          entry->rel, entry->page,
-                                         entry->offset, res->len, FALSE);
+                                         entry->offset,
+#ifndef PG_MODULE_MAGIC
+                                         res->len,
+#endif
+                                         FALSE);
        } else if ( !ISALLTRUE(DatumGetPointer(entry->key)) ) {
                int4        i;
                GISTTYPE   *res;
@@ -155,7 +159,11 @@ ghstore_compress(PG_FUNCTION_ARGS) {
                retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
                gistentryinit(*retval, PointerGetDatum(res),
                                          entry->rel, entry->page,
-                                         entry->offset, res->len, FALSE);
+                                         entry->offset, 
+#ifndef PG_MODULE_MAGIC
+                                         res->len,
+#endif
+                                         FALSE);
        }
 
        PG_RETURN_POINTER(retval);