77 * to a pending table for mirroring.
88 * All tables that should be mirrored should have this trigger hooked up to it.
99 *
10- * Written by Steven Singer
10+ * Written by Steven Singer
1111 * (c) 2001-2002 Navtech Systems Support Inc.
1212 * ALL RIGHTS RESERVED
1313 *
3838#include "commands/trigger.h"
3939#include "utils/lsyscache.h"
4040#include "utils/array.h"
41+ #include "utils/rel.h"
4142#include "catalog/pg_type.h"
4243#include "access/xact.h"
4344
@@ -267,7 +268,7 @@ storePending(char *cpTableName, HeapTuple tBeforeTuple,
267268 iResult = storeData (cpTableName , tBeforeTuple , tTupDesc , tableOid , TRUE, ALLKEYS );
268269 else
269270 iResult = storeKeyInfo (cpTableName , tBeforeTuple , tTupDesc , tableOid );
270-
271+
271272 }
272273 else if (cOp == 'i' )
273274 {
@@ -281,11 +282,11 @@ storePending(char *cpTableName, HeapTuple tBeforeTuple,
281282 else
282283 {
283284 /* op must be an update. */
284- if (verbose == TRUE)
285+ if (verbose == TRUE)
285286 iResult = storeData (cpTableName , tBeforeTuple , tTupDesc , tableOid , TRUE, ALLKEYS );
286287 else
287288 iResult = storeKeyInfo (cpTableName , tBeforeTuple , tTupDesc , tableOid );
288-
289+
289290 iResult = iResult ? iResult :
290291 storeData (cpTableName , tAfterTuple , tTupDesc , tableOid , FALSE, ALL );
291292 }
@@ -499,8 +500,8 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc, Oid tableOid,
499500
500501 if (tpPKeys != NULL )
501502 debug_msg ("dbmirror:packageData have primary keys" );
502-
503- // Get FKs if required
503+
504+ // Get FKs if required
504505 if (eKeyUsage == ALLKEYS )
505506 {
506507 tpFKeys = getForeignKey (tableOid );
@@ -660,7 +661,7 @@ packageData(HeapTuple tTupleData, TupleDesc tTupleDesc, Oid tableOid,
660661 SPI_pfree (tpPKeys );
661662 if (tpFKeys != NULL )
662663 SPI_pfree (tpFKeys );
663-
664+
664665 debug_msg3 ("dbmirror:packageData returning DataBlockSize:%d iUsedDataBlock:%d" ,
665666 iDataBlockSize ,
666667 iUsedDataBlock );
0 commit comments