OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/pgsql/uuid.c versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/pgsql/uuid.c 1.8 -> 1.9

--- uuid.c       2007/01/01 18:14:58     1.8
+++ uuid.c       2007/10/12 20:34:47     1.9
@@ -200,7 +200,11 @@
     if ((uuid_bytea = (bytea *)palloc(VARHDRSZ + UUID_LEN_BIN)) == NULL)
         ereport(ERROR, (errcode(ERRCODE_DATA_EXCEPTION),
                 errmsg("failed to allocate UUID bytea")));
+#if defined(SET_VARSIZE) /* PostgreSQL >= 8.3 */
+    SET_VARSIZE(uuid_bytea, VARHDRSZ + UUID_LEN_BIN);
+#else
     uuid_bytea->vl_len = VARHDRSZ + UUID_LEN_BIN;
+#endif
     memcpy(uuid_bytea->vl_dat, uuid_datum->uuid_bin, UUID_LEN_BIN);
 
     /* return UUID bytea */

CVSTrac 2.0.1