File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ if (!($result = pg_get_result($db))) {
62
62
die ('pg_get_result() ' );
63
63
}
64
64
65
+ if (pg_result_status ($ result ) !== PGSQL_TUPLES_OK ) {
66
+ die ('pg_result_status{} ' );
67
+ }
68
+
65
69
if (pg_num_rows ($ result ) == -1 ) {
66
70
die ('pg_num_rows() ' );
67
71
}
@@ -71,9 +75,15 @@ if (!pg_fetch_row($result, null)) {
71
75
}
72
76
73
77
pg_free_result ($ result );
74
- while (pg_connection_busy ($ db )) {
75
- nb_flush ($ db , $ db_socket );
76
- nb_consume ($ db , $ db_socket );
78
+
79
+ if (pg_get_result ($ db ) !== false ) {
80
+ die ('pg_get_result() ' );
81
+ }
82
+
83
+ if (($ result = pg_get_result ($ db )) !== false ) {
84
+ if (pg_result_status ($ result ) !== PGSQL_PIPELINE_SYNC ) {
85
+ die ('pg_result_status() ' );
86
+ }
77
87
}
78
88
79
89
if (!pg_exit_pipeline_mode ($ db )) {
You can’t perform that action at this time.
0 commit comments