@@ -99,18 +99,18 @@ static void pgsql_stmt_finish(pdo_pgsql_stmt *S, int fin_mode)
99
99
if (S -> stmt_name && S -> is_prepared && (fin_mode & FIN_CLOSE )) {
100
100
PGresult * res ;
101
101
#ifndef HAVE_PQCLOSEPREPARED
102
- // TODO (??) libpq does not support close statement protocol < postgres 17
103
- // check if we can circumvent this.
104
- char * q = NULL ;
105
- spprintf (& q , 0 , "DEALLOCATE %s" , S -> stmt_name );
106
- res = PQexec (H -> server , q );
107
- efree (q );
102
+ // TODO (??) libpq does not support close statement protocol < postgres 17
103
+ // check if we can circumvent this.
104
+ char * q = NULL ;
105
+ spprintf (& q , 0 , "DEALLOCATE %s" , S -> stmt_name );
106
+ res = PQexec (H -> server , q );
107
+ efree (q );
108
108
#else
109
- res = PQclosePrepared (H -> server , S -> stmt_name );
109
+ res = PQclosePrepared (H -> server , S -> stmt_name );
110
110
#endif
111
- if (res ) {
112
- PQclear (res );
113
- }
111
+ if (res ) {
112
+ PQclear (res );
113
+ }
114
114
115
115
S -> is_prepared = false;
116
116
if (H -> running_stmt == S ) {
@@ -284,7 +284,7 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt)
284
284
S -> param_formats ,
285
285
0 );
286
286
} else {
287
- S -> result = PQexecPrepared (H -> server , S -> stmt_name ,
287
+ S -> result = PQexecPrepared (H -> server , S -> stmt_name ,
288
288
stmt -> bound_params ?
289
289
zend_hash_num_elements (stmt -> bound_params ) :
290
290
0 ,
@@ -304,7 +304,7 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt)
304
304
S -> param_formats ,
305
305
0 );
306
306
} else {
307
- S -> result = PQexecParams (H -> server , ZSTR_VAL (S -> query ),
307
+ S -> result = PQexecParams (H -> server , ZSTR_VAL (S -> query ),
308
308
stmt -> bound_params ? zend_hash_num_elements (stmt -> bound_params ) : 0 ,
309
309
S -> param_types ,
310
310
(const char * * )S -> param_values ,
@@ -317,7 +317,7 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt)
317
317
if (S -> is_unbuffered ) {
318
318
dispatch_result = PQsendQuery (H -> server , ZSTR_VAL (stmt -> active_query_string ));
319
319
} else {
320
- S -> result = PQexec (H -> server , ZSTR_VAL (stmt -> active_query_string ));
320
+ S -> result = PQexec (H -> server , ZSTR_VAL (stmt -> active_query_string ));
321
321
}
322
322
}
323
323
0 commit comments