Wed May 2 14:36:19 PDT 2007
- Previous message: [Slony1-commit] slony1-engine Makefile.global.in configure.ac
- Next message: [Slony1-commit] slony1-engine Makefile.global.in configure.ac RELEASE-1.2.10
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/backend In directory main.slony.info:/tmp/cvs-serv8603/src/backend Modified Files: slony1_funcs.c Log Message: Changes to support PostgreSQL 8.3 as VARATT_SIZEP has been deprecated. Index: slony1_funcs.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** slony1_funcs.c 18 Apr 2007 21:20:22 -0000 1.59 --- slony1_funcs.c 2 May 2007 21:36:17 -0000 1.60 *************** *** 45,50 **** /* -- Change from PostgreSQL Ver 8.3 -- */ ! #ifndef VARATT_SIZEP ! #define VARATT_SIZEP VARATT_SIZEP_DEPRECATED #endif --- 45,50 ---- /* -- Change from PostgreSQL Ver 8.3 -- */ ! #if !((PG_VERSION_MAJOR > 8) || ((PG_VERSION_MAJOR == 8) && (PG_VERSION_MINOR >= 3))) ! #define SET_VARSIZE(datum, size) (VARATT_SIZEP(datum)=(size)) #endif *************** *** 311,315 **** len = strlen(SLONY_I_VERSION_STRING); retval = palloc(VARHDRSZ + len); ! VARATT_SIZEP(retval) = VARHDRSZ + len; memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); --- 311,316 ---- len = strlen(SLONY_I_VERSION_STRING); retval = palloc(VARHDRSZ + len); ! ! SET_VARSIZE(retval,VARHDRSZ + len); memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); *************** *** 384,388 **** cs->session_role = SLON_ROLE_NORMAL; retval = palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) = VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; --- 385,389 ---- cs->session_role = SLON_ROLE_NORMAL; retval = palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; *************** *** 390,394 **** case SLON_ROLE_NORMAL: retval = palloc(VARHDRSZ + 6); ! VARATT_SIZEP(retval) = VARHDRSZ + 6; memcpy(VARDATA(retval), "normal", 6); break; --- 391,395 ---- case SLON_ROLE_NORMAL: retval = palloc(VARHDRSZ + 6); ! SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; *************** *** 396,400 **** case SLON_ROLE_SLON: retval = palloc(VARHDRSZ + 4); ! VARATT_SIZEP(retval) = VARHDRSZ + 4; memcpy(VARDATA(retval), "slon", 4); break; --- 397,401 ---- case SLON_ROLE_SLON: retval = palloc(VARHDRSZ + 4); ! SET_VARSIZE(retval, VARHDRSZ + 4); memcpy(VARDATA(retval), "slon", 4); break; *************** *** 491,495 **** if (SPI_processed != 1) elog(ERROR, "Slony-I: cannot determine log status"); ! log_status = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); --- 492,496 ---- if (SPI_processed != 1) elog(ERROR, "Slony-I: cannot determine log status"); ! log_status = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, NULL)); *************** *** 637,642 **** *cp++ = ')'; *cp = '\0'; ! VARATT_SIZEP(cs->cmddata_buf) = ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) --- 638,643 ---- *cp++ = ')'; *cp = '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) *************** *** 875,880 **** } *cp = '\0'; ! VARATT_SIZEP(cs->cmddata_buf) = ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) --- 876,881 ---- } *cp = '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) *************** *** 942,947 **** } *cp = '\0'; ! VARATT_SIZEP(cs->cmddata_buf) = ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); } else --- 943,948 ---- } *cp = '\0'; ! SET_VARSIZE(cs->cmddata_buf, ! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else *************** *** 1251,1255 **** len = strlen(qstr); result = (text *) palloc(len + VARHDRSZ); ! VARATT_SIZEP(result) = len + VARHDRSZ; memcpy(VARDATA(result), qstr, len); --- 1252,1256 ---- len = strlen(qstr); result = (text *) palloc(len + VARHDRSZ); ! SET_VARSIZE(result, len + VARHDRSZ); memcpy(VARDATA(result), qstr, len); *************** *** 1493,1503 **** */ cs->cmdtype_I = malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_I) = VARHDRSZ + 1; *VARDATA(cs->cmdtype_I) = 'I'; cs->cmdtype_U = malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_U) = VARHDRSZ + 1; *VARDATA(cs->cmdtype_U) = 'U'; cs->cmdtype_D = malloc(VARHDRSZ + 1); ! VARATT_SIZEP(cs->cmdtype_D) = VARHDRSZ + 1; *VARDATA(cs->cmdtype_D) = 'D'; --- 1494,1504 ---- */ cs->cmdtype_I = malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_I, VARHDRSZ + 1); *VARDATA(cs->cmdtype_I) = 'I'; cs->cmdtype_U = malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_U, VARHDRSZ + 1); *VARDATA(cs->cmdtype_U) = 'U'; cs->cmdtype_D = malloc(VARHDRSZ + 1); ! SET_VARSIZE(cs->cmdtype_D, VARHDRSZ + 1); *VARDATA(cs->cmdtype_D) = 'D';
- Previous message: [Slony1-commit] slony1-engine Makefile.global.in configure.ac
- Next message: [Slony1-commit] slony1-engine Makefile.global.in configure.ac RELEASE-1.2.10
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list