int status;
int i;
- /* The user data may hold parameter information */
+ /* The user data may hold parameter information, but may be NULL. */
data = udb_query_get_user_data (q);
/* Versions up to `3' don't know how to handle parameters. */
&db->queries, &db->queries_num);
}
+ for (i = 0; (size_t)i < db->queries_num; ++i) {
+ c_psql_user_data_t *data;
+ data = udb_query_get_user_data (db->queries[i]);
+ if ((data != NULL) && (data->params_num > db->max_params_num))
+ db->max_params_num = data->params_num;
+ }
return 0;
} /* c_psql_config_database */