1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Fix elog in dbmirror to use %s.

Hai-Chen Tu
This commit is contained in:
Bruce Momjian
2002-11-22 16:05:06 +00:00
parent 1e68232b35
commit 7082e7e43a

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
* pending.c * pending.c
* $Id: pending.c,v 1.6.2.1 2002/11/06 17:51:40 momjian Exp $ * $Id: pending.c,v 1.6.2.2 2002/11/22 16:05:06 momjian Exp $
* *
* This file contains a trigger for Postgresql-7.x to record changes to tables * This file contains a trigger for Postgresql-7.x to record changes to tables
* to a pending table for mirroring. * to a pending table for mirroring.
@@ -218,7 +218,7 @@ storePending(char *cpTableName, HeapTuple tBeforeTuple,
} }
#if defined DEBUG_OUTPUT #if defined DEBUG_OUTPUT
elog(NOTICE, "DOne storing keyinfo"); elog(NOTICE, "Done storing keyinfo");
#endif #endif
return iResult; return iResult;
@@ -253,7 +253,7 @@ storeKeyInfo(char *cpTableName, HeapTuple tTupleData,
return -1; return -1;
} }
#if defined DEBUG_OUTPUT #if defined DEBUG_OUTPUT
elog(NOTICE, cpKeyData); elog(NOTICE, "%s", cpKeyData);
#endif #endif
saPlanData[0] = PointerGetDatum(cpKeyData); saPlanData[0] = PointerGetDatum(cpKeyData);
@@ -437,7 +437,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc,
cpFieldName = DatumGetPointer(NameGetDatum(&tTupleDesc->attrs cpFieldName = DatumGetPointer(NameGetDatum(&tTupleDesc->attrs
[iColumnCounter - 1]->attname)); [iColumnCounter - 1]->attname));
#if defined DEBUG_OUTPUT #if defined DEBUG_OUTPUT
elog(NOTICE, cpFieldName); elog(NOTICE, "%s", cpFieldName);
#endif #endif
while (iDataBlockSize - iUsedDataBlock < strlen(cpFieldName) + 6) while (iDataBlockSize - iUsedDataBlock < strlen(cpFieldName) + 6)
{ {
@@ -465,7 +465,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc,
} }
#if defined DEBUG_OUTPUT #if defined DEBUG_OUTPUT
elog(NOTICE, cpFieldData); elog(NOTICE, "%s", cpFieldData);
elog(NOTICE, "Starting format loop"); elog(NOTICE, "Starting format loop");
#endif #endif
while (*cpUnFormatedPtr != 0) while (*cpUnFormatedPtr != 0)
@@ -499,7 +499,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc,
sprintf(cpFormatedPtr, "' "); sprintf(cpFormatedPtr, "' ");
iUsedDataBlock = iUsedDataBlock + 2; iUsedDataBlock = iUsedDataBlock + 2;
#if defined DEBUG_OUTPUT #if defined DEBUG_OUTPUT
elog(NOTICE, cpDataBlock); elog(NOTICE, "%s", cpDataBlock);
#endif #endif
} /* for iColumnCounter */ } /* for iColumnCounter */