Mon May 15 07:47:31 PDT 2006
- Previous message: [Slony1-commit] By wieck: Guard the log trigger against old PK values being NULL Jan
- Next message: [Slony1-commit] By cbbrowne: Added two scripts to help analyze the states of sets of
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Guard the log trigger against old PK values being NULL
Jan
Tags:
----
REL_1_1_STABLE
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.c (r1.33.2.4 -> r1.33.2.5)
-------------- next part --------------
Index: slony1_funcs.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.33.2.4
retrieving revision 1.33.2.5
diff -Lsrc/backend/slony1_funcs.c -Lsrc/backend/slony1_funcs.c -u -w -r1.33.2.4 -r1.33.2.5
--- src/backend/slony1_funcs.c
+++ src/backend/slony1_funcs.c
@@ -781,6 +781,9 @@
continue;
col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
+ if (col_value == NULL)
+ elog(ERROR, "Slony-I: old key column %s.%s IS NULL on UPDATE",
+ NameStr(tg->tg_relation->rd_rel->relname), col_ident);
cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
@@ -845,6 +848,9 @@
continue;
col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
+ if (col_value == NULL)
+ elog(ERROR, "Slony-I: old key column %s.%s IS NULL on DELETE",
+ NameStr(tg->tg_relation->rd_rel->relname), col_ident);
cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
@@ -1041,6 +1047,9 @@
int len;
int wl;
+ if (str == NULL)
+ return NULL;
+
len = strlen(str);
result = palloc(len * 2 + 3);
cp1 = str;
- Previous message: [Slony1-commit] By wieck: Guard the log trigger against old PK values being NULL Jan
- Next message: [Slony1-commit] By cbbrowne: Added two scripts to help analyze the states of sets of
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list