@@ -368,21 +368,21 @@ static void
368368do_sql_send_command (PGconn * conn , const char * sql )
369369{
370370 if (PQsendQuery (conn , sql ) != PGRES_COMMAND_OK ) {
371- PGresult * res = PQgetResult (conn );
371+ PGresult * res = PQgetResult (conn );
372372 pgfdw_report_error (ERROR , res , conn , true, sql );
373- PQclear (res );
374- }
373+ PQclear (res );
374+ }
375375}
376376
377377static void
378378do_sql_wait_command (PGconn * conn , const char * sql )
379379{
380- PGresult * res ;
381- while ((res = PQgetResult (conn )) != NULL ) {
382- if (PQresultStatus (res ) != PGRES_COMMAND_OK )
383- pgfdw_report_error (ERROR , res , conn , true, sql );
384- PQclear (res );
385- }
380+ PGresult * res ;
381+ while ((res = PQgetResult (conn )) != NULL ) {
382+ if (PQresultStatus (res ) != PGRES_COMMAND_OK )
383+ pgfdw_report_error (ERROR , res , conn , true, sql );
384+ PQclear (res );
385+ }
386386}
387387
388388/*
@@ -403,20 +403,20 @@ begin_remote_xact(ConnCacheEntry *entry)
403403 /* Start main transaction if we haven't yet */
404404 if (entry -> xact_depth <= 0 )
405405 {
406- TransactionId gxid = GetTransactionManager ()-> GetGlobalTransactionId ();
406+ TransactionId gxid = GetTransactionManager ()-> GetGlobalTransactionId ();
407407 const char * sql ;
408408
409409 elog (DEBUG3 , "starting remote transaction on connection %p" ,
410410 entry -> conn );
411411
412- if (TransactionIdIsValid (gxid )) {
413- char stmt [64 ];
414- PGresult * res ;
412+ if (TransactionIdIsValid (gxid )) {
413+ char stmt [64 ];
414+ PGresult * res ;
415415
416- snprintf (stmt , sizeof (stmt ), "select public.dtm_join_transaction(%d)" , gxid );
417- res = PQexec (entry -> conn , stmt );
418- PQclear (res );
419- }
416+ snprintf (stmt , sizeof (stmt ), "select public.dtm_join_transaction(%d)" , gxid );
417+ res = PQexec (entry -> conn , stmt );
418+ PQclear (res );
419+ }
420420
421421 if (IsolationIsSerializable ())
422422 sql = "START TRANSACTION ISOLATION LEVEL SERIALIZABLE" ;
@@ -607,7 +607,7 @@ pgfdw_xact_callback(XactEvent event, void *arg)
607607 case XACT_EVENT_PARALLEL_COMMIT :
608608 case XACT_EVENT_COMMIT :
609609 case XACT_EVENT_PREPARE :
610- do_sql_wait_command (entry -> conn , "COMMIT TRANSACTION" );
610+ do_sql_wait_command (entry -> conn , "COMMIT TRANSACTION" );
611611 /*
612612 * If there were any errors in subtransactions, and we
613613 * made prepared statements, do a DEALLOCATE ALL to make
@@ -680,17 +680,17 @@ pgfdw_xact_callback(XactEvent event, void *arg)
680680 }
681681 }
682682
683- if (event != XACT_EVENT_PARALLEL_PRE_COMMIT && event != XACT_EVENT_PRE_COMMIT ) {
684- /*
685- * Regardless of the event type, we can now mark ourselves as out of the
686- * transaction. (Note: if we are here during PRE_COMMIT or PRE_PREPARE,
687- * this saves a useless scan of the hashtable during COMMIT or PREPARE.)
688- */
689- xact_got_connection = false;
690-
691- /* Also reset cursor numbering for next transaction */
692- cursor_number = 0 ;
693- }
683+ if (event != XACT_EVENT_PARALLEL_PRE_COMMIT && event != XACT_EVENT_PRE_COMMIT ) {
684+ /*
685+ * Regardless of the event type, we can now mark ourselves as out of the
686+ * transaction. (Note: if we are here during PRE_COMMIT or PRE_PREPARE,
687+ * this saves a useless scan of the hashtable during COMMIT or PREPARE.)
688+ */
689+ xact_got_connection = false;
690+
691+ /* Also reset cursor numbering for next transaction */
692+ cursor_number = 0 ;
693+ }
694694}
695695
696696/*
0 commit comments