Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
slony1
slony1-VARATT_SIZEP.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File slony1-VARATT_SIZEP.diff of Package slony1
--- src/backend/slony1_funcs.c +++ src/backend/slony1_funcs.c @@ -290,7 +290,7 @@ len = strlen(SLONY_I_VERSION_STRING); retval = palloc(VARHDRSZ + len); - VARATT_SIZEP(retval) = VARHDRSZ + len; + SET_VARSIZE(retval, VARHDRSZ + len); memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len); PG_RETURN_TEXT_P(retval); @@ -363,19 +363,19 @@ case SLON_ROLE_UNSET: cs->session_role = SLON_ROLE_NORMAL; retval = palloc(VARHDRSZ + 6); - VARATT_SIZEP(retval) = VARHDRSZ + 6; + SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; case SLON_ROLE_NORMAL: retval = palloc(VARHDRSZ + 6); - VARATT_SIZEP(retval) = VARHDRSZ + 6; + SET_VARSIZE(retval, VARHDRSZ + 6); memcpy(VARDATA(retval), "normal", 6); break; case SLON_ROLE_SLON: retval = palloc(VARHDRSZ + 4); - VARATT_SIZEP(retval) = VARHDRSZ + 4; + SET_VARSIZE(retval, VARHDRSZ + 4); memcpy(VARDATA(retval), "slon", 4); break; } @@ -616,8 +616,8 @@ */ *cp++ = ')'; *cp = '\0'; - VARATT_SIZEP(cs->cmddata_buf) = - VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); + SET_VARSIZE(cs->cmddata_buf, + VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event)) { @@ -854,8 +854,8 @@ cp += len_value; } *cp = '\0'; - VARATT_SIZEP(cs->cmddata_buf) = - VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); + SET_VARSIZE(cs->cmddata_buf, + VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event)) { @@ -921,8 +921,8 @@ cp += len_value; } *cp = '\0'; - VARATT_SIZEP(cs->cmddata_buf) = - VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)); + SET_VARSIZE(cs->cmddata_buf, + VARHDRSZ + (cp - VARDATA(cs->cmddata_buf))); } else elog(ERROR, "Slony-I: logTrigger() fired for unhandled event"); @@ -1230,7 +1230,7 @@ len = strlen(qstr); result = (text *) palloc(len + VARHDRSZ); - VARATT_SIZEP(result) = len + VARHDRSZ; + SET_VARSIZE(result, len + VARHDRSZ); memcpy(VARDATA(result), qstr, len); PG_RETURN_TEXT_P(result); @@ -1345,11 +1345,7 @@ lappend(lappend(NIL, makeString(NameStr(cs->clustername))), makeString("xxid")); -#ifdef HAVE_TYPENAMETYPEID_2 - xxid_typid = typenameTypeId(NULL,xxid_typename); -#else - xxid_typid = typenameTypeId(xxid_typename); -#endif + xxid_typid = typenameTypeId(NULL,xxid_typename,NULL); plan_types[0] = INT4OID; /* @@ -1428,11 +1424,7 @@ xxid_typename->names = lappend(lappend(NIL, makeString(NameStr(cs->clustername))), makeString("xxid")); -#ifdef HAVE_TYPENAMETYPEID_2 - xxid_typid = typenameTypeId(NULL, xxid_typename); -#else - xxid_typid = typenameTypeId(xxid_typename); -#endif + xxid_typid = typenameTypeId(NULL, xxid_typename,NULL); /* * Create the saved plan's @@ -1472,13 +1464,13 @@ * parameter and initialize the cmddata_buf. */ cs->cmdtype_I = malloc(VARHDRSZ + 1); - VARATT_SIZEP(cs->cmdtype_I) = VARHDRSZ + 1; + SET_VARSIZE(cs->cmdtype_I, VARHDRSZ + 1); *VARDATA(cs->cmdtype_I) = 'I'; cs->cmdtype_U = malloc(VARHDRSZ + 1); - VARATT_SIZEP(cs->cmdtype_U) = VARHDRSZ + 1; + SET_VARSIZE(cs->cmdtype_U, VARHDRSZ + 1); *VARDATA(cs->cmdtype_U) = 'U'; cs->cmdtype_D = malloc(VARHDRSZ + 1); - VARATT_SIZEP(cs->cmdtype_D) = VARHDRSZ + 1; + SET_VARSIZE(cs->cmdtype_D, VARHDRSZ + 1); *VARDATA(cs->cmdtype_D) = 'D'; /*
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor