@@ -2790,8 +2790,7 @@ postgresEndDirectModify(ForeignScanState *node)
2790
2790
return ;
2791
2791
2792
2792
/* Release PGresult */
2793
- if (dmstate -> result )
2794
- PQclear (dmstate -> result );
2793
+ PQclear (dmstate -> result );
2795
2794
2796
2795
/* Release remote connection */
2797
2796
ReleaseConnection (dmstate -> conn );
@@ -3604,8 +3603,7 @@ get_remote_estimate(const char *sql, PGconn *conn,
3604
3603
}
3605
3604
PG_FINALLY ();
3606
3605
{
3607
- if (res )
3608
- PQclear (res );
3606
+ PQclear (res );
3609
3607
}
3610
3608
PG_END_TRY ();
3611
3609
}
@@ -3853,8 +3851,7 @@ fetch_more_data(ForeignScanState *node)
3853
3851
}
3854
3852
PG_FINALLY ();
3855
3853
{
3856
- if (res )
3857
- PQclear (res );
3854
+ PQclear (res );
3858
3855
}
3859
3856
PG_END_TRY ();
3860
3857
@@ -4338,8 +4335,7 @@ store_returning_result(PgFdwModifyState *fmstate,
4338
4335
}
4339
4336
PG_CATCH ();
4340
4337
{
4341
- if (res )
4342
- PQclear (res );
4338
+ PQclear (res );
4343
4339
PG_RE_THROW ();
4344
4340
}
4345
4341
PG_END_TRY ();
@@ -4627,8 +4623,7 @@ get_returning_data(ForeignScanState *node)
4627
4623
}
4628
4624
PG_CATCH ();
4629
4625
{
4630
- if (dmstate -> result )
4631
- PQclear (dmstate -> result );
4626
+ PQclear (dmstate -> result );
4632
4627
PG_RE_THROW ();
4633
4628
}
4634
4629
PG_END_TRY ();
@@ -4957,8 +4952,7 @@ postgresAnalyzeForeignTable(Relation relation,
4957
4952
}
4958
4953
PG_FINALLY ();
4959
4954
{
4960
- if (res )
4961
- PQclear (res );
4955
+ PQclear (res );
4962
4956
}
4963
4957
PG_END_TRY ();
4964
4958
@@ -5114,8 +5108,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
5114
5108
}
5115
5109
PG_CATCH ();
5116
5110
{
5117
- if (res )
5118
- PQclear (res );
5111
+ PQclear (res );
5119
5112
PG_RE_THROW ();
5120
5113
}
5121
5114
PG_END_TRY ();
@@ -5496,8 +5489,7 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
5496
5489
}
5497
5490
PG_FINALLY ();
5498
5491
{
5499
- if (res )
5500
- PQclear (res );
5492
+ PQclear (res );
5501
5493
}
5502
5494
PG_END_TRY ();
5503
5495