Thu Apr 26 09:11:07 PDT 2007
- Previous message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Next message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christopher Browne wrote:
> Dave Page wrote:
>> As discussed on slony1-hackers, this patch updates -HEAD for
>> compatibility with PostgreSQL -HEAD. It's quite simple, so I think it
>> should be back patched to 1.2.x so we have something to release with
>> PostgreSQL 8.3 - I'll produce another patch if everyone is happy.
>>
>> Autoconf should be re-run when the patch is applied. I don't have CVS
>> write access yet so I can't commit this...
> I'll see about applying this today...
Thanks - the 1.2 version is attached as well.
Regards, Dave
-------------- next part --------------
Index: Makefile.global.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /slony1/slony1-engine/Makefile.global.in,v
retrieving revision 1.34.2.1
diff -c -r1.34.2.1 Makefile.global.in
*** Makefile.global.in 26 Oct 2006 18:55:05 -0000 1.34.2.1
--- Makefile.global.in 26 Apr 2007 16:07:07 -0000
***************
*** 9,14 ****
--- 9,19 ----
# $Id: Makefile.global.in,v 1.34.2.1 2006-10-26 18:55:05 wieck Exp $
# ----------
=
+ # PostgreSQL Version
+ PG_VERSION_MAJOR=3D @PG_VERSION_MAJOR@
+ PG_VERSION_MINOR=3D @PG_VERSION_MINOR@
+ PG_VERSION=3D @PG_VERSION@
+ =
#location substitutions
=
pgincludedir=3D @PGINCLUDEDIR@
Index: configure.ac
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /slony1/slony1-engine/configure.ac,v
retrieving revision 1.57.2.2
diff -c -r1.57.2.2 configure.ac
*** configure.ac 20 Feb 2007 11:29:39 -0000 1.57.2.2
--- configure.ac 26 Apr 2007 16:07:07 -0000
***************
*** 162,167 ****
--- 162,171 ----
ACX_LIBSNMP()
ACX_SLONYTOOLS()
=
+ AC_SUBST(PG_VERSION_MAJOR, $PG_VERSION_MAJOR)
+ AC_SUBST(PG_VERSION_MINOR, $PG_VERSION_MINOR)
+ AC_SUBST(PG_VERSION, $PG_VERSION)
+ =
AC_SUBST(PGINCLUDEDIR, $PG_INCLUDEDIR)
AC_SUBST(PGINCLUDESERVERDIR, $PG_INCLUDESERVERDIR)
AC_SUBST(PGLIBDIR, $PG_LIBDIR)
Index: src/backend/slony1_funcs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.53.2.1
diff -c -r1.53.2.1 slony1_funcs.c
*** src/backend/slony1_funcs.c 18 Apr 2007 19:28:27 -0000 1.53.2.1
--- src/backend/slony1_funcs.c 26 Apr 2007 16:07:08 -0000
***************
*** 41,48 ****
#endif
=
/* -- Change from PostgreSQL Ver 8.3 -- */
! #ifndef VARATT_SIZEP
! #define VARATT_SIZEP VARATT_SIZEP_DEPRECATED
#endif
=
PG_FUNCTION_INFO_V1(_Slony_I_createEvent);
--- 41,48 ----
#endif
=
/* -- Change from PostgreSQL Ver 8.3 -- */
! #if !((PG_VERSION_MAJOR >=3D 8) || ((PG_VERSION_MAJOR =3D=3D 8) && (PG_VE=
RSION_MINOR >=3D 3)))
! #define SET_VARSIZE(datum, size) (VARATT_SIZEP(datum)=3D(size))
#endif
=
PG_FUNCTION_INFO_V1(_Slony_I_createEvent);
***************
*** 295,301 ****
=
len =3D strlen(SLONY_I_VERSION_STRING);
retval =3D palloc(VARHDRSZ + len);
! VARATT_SIZEP(retval) =3D VARHDRSZ + len;
memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len);
=
PG_RETURN_TEXT_P(retval);
--- 295,302 ----
=
len =3D strlen(SLONY_I_VERSION_STRING);
retval =3D palloc(VARHDRSZ + len);
! =
! SET_VARSIZE(retval,VARHDRSZ + len);
memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len);
=
PG_RETURN_TEXT_P(retval);
***************
*** 368,386 ****
case SLON_ROLE_UNSET:
cs->session_role =3D SLON_ROLE_NORMAL;
retval =3D palloc(VARHDRSZ + 6);
! VARATT_SIZEP(retval) =3D VARHDRSZ + 6;
memcpy(VARDATA(retval), "normal", 6);
break;
=
case SLON_ROLE_NORMAL:
retval =3D palloc(VARHDRSZ + 6);
! VARATT_SIZEP(retval) =3D VARHDRSZ + 6;
memcpy(VARDATA(retval), "normal", 6);
break;
=
case SLON_ROLE_SLON:
retval =3D palloc(VARHDRSZ + 4);
! VARATT_SIZEP(retval) =3D VARHDRSZ + 4;
memcpy(VARDATA(retval), "slon", 4);
break;
}
--- 369,387 ----
case SLON_ROLE_UNSET:
cs->session_role =3D SLON_ROLE_NORMAL;
retval =3D palloc(VARHDRSZ + 6);
! SET_VARSIZE(retval, VARHDRSZ + 6);
memcpy(VARDATA(retval), "normal", 6);
break;
=
case SLON_ROLE_NORMAL:
retval =3D palloc(VARHDRSZ + 6);
! SET_VARSIZE(retval, VARHDRSZ + 6);
memcpy(VARDATA(retval), "normal", 6);
break;
=
case SLON_ROLE_SLON:
retval =3D palloc(VARHDRSZ + 4);
! SET_VARSIZE(retval, VARHDRSZ + 4);
memcpy(VARDATA(retval), "slon", 4);
break;
}
***************
*** 475,481 ****
elog(ERROR, "Slony-I: cannot determine log status");
if (SPI_processed !=3D 1)
elog(ERROR, "Slony-I: cannot determine log status");
! =
log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0],
SPI_tuptable->tupdesc, 1, NULL));
SPI_freetuptable(SPI_tuptable);
--- 476,482 ----
elog(ERROR, "Slony-I: cannot determine log status");
if (SPI_processed !=3D 1)
elog(ERROR, "Slony-I: cannot determine log status");
! =
log_status =3D DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0],
SPI_tuptable->tupdesc, 1, NULL));
SPI_freetuptable(SPI_tuptable);
***************
*** 621,628 ****
*/
*cp++ =3D ')';
*cp =3D '\0';
! VARATT_SIZEP(cs->cmddata_buf) =3D
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf));
}
else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event))
{
--- 622,629 ----
*/
*cp++ =3D ')';
*cp =3D '\0';
! SET_VARSIZE(cs->cmddata_buf, =
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event))
{
***************
*** 859,866 ****
cp +=3D len_value;
}
*cp =3D '\0';
! VARATT_SIZEP(cs->cmddata_buf) =3D
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf));
}
else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event))
{
--- 860,867 ----
cp +=3D len_value;
}
*cp =3D '\0';
! SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event))
{
***************
*** 926,933 ****
cp +=3D len_value;
}
*cp =3D '\0';
! VARATT_SIZEP(cs->cmddata_buf) =3D
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf));
}
else
elog(ERROR, "Slony-I: logTrigger() fired for unhandled event");
--- 927,934 ----
cp +=3D len_value;
}
*cp =3D '\0';
! SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else
elog(ERROR, "Slony-I: logTrigger() fired for unhandled event");
***************
*** 1235,1241 ****
=
len =3D strlen(qstr);
result =3D (text *) palloc(len + VARHDRSZ);
! VARATT_SIZEP(result) =3D len + VARHDRSZ;
memcpy(VARDATA(result), qstr, len);
=
PG_RETURN_TEXT_P(result);
--- 1236,1242 ----
=
len =3D strlen(qstr);
result =3D (text *) palloc(len + VARHDRSZ);
! SET_VARSIZE(result, len + VARHDRSZ);
memcpy(VARDATA(result), qstr, len);
=
PG_RETURN_TEXT_P(result);
***************
*** 1477,1489 ****
* parameter and initialize the cmddata_buf.
*/
cs->cmdtype_I =3D malloc(VARHDRSZ + 1);
! VARATT_SIZEP(cs->cmdtype_I) =3D VARHDRSZ + 1;
*VARDATA(cs->cmdtype_I) =3D 'I';
cs->cmdtype_U =3D malloc(VARHDRSZ + 1);
! VARATT_SIZEP(cs->cmdtype_U) =3D VARHDRSZ + 1;
*VARDATA(cs->cmdtype_U) =3D 'U';
cs->cmdtype_D =3D malloc(VARHDRSZ + 1);
! VARATT_SIZEP(cs->cmdtype_D) =3D VARHDRSZ + 1;
*VARDATA(cs->cmdtype_D) =3D 'D';
=
/*
--- 1478,1490 ----
* parameter and initialize the cmddata_buf.
*/
cs->cmdtype_I =3D malloc(VARHDRSZ + 1);
! SET_VARSIZE(cs->cmdtype_I, VARHDRSZ + 1);
*VARDATA(cs->cmdtype_I) =3D 'I';
cs->cmdtype_U =3D malloc(VARHDRSZ + 1);
! SET_VARSIZE(cs->cmdtype_U, VARHDRSZ + 1);
*VARDATA(cs->cmdtype_U) =3D 'U';
cs->cmdtype_D =3D malloc(VARHDRSZ + 1);
! SET_VARSIZE(cs->cmdtype_D, VARHDRSZ + 1);
*VARDATA(cs->cmdtype_D) =3D 'D';
=
/*
- Previous message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Next message: [Slony1-patches] PostgreSQL 8.3 compatibilty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-patches mailing list