Extend the database module to handle the PGRES_TUPLES_CHUNK case introduced in PostgreSQL 17. This ensures compatibility with the latest PostgreSQL version and prevents potential issues when processing query results.
#if PG_VERSION_NUM >= 90002
case PGRES_SINGLE_TUPLE:
/* Added in PostgreSQL 9.2 */
+#endif
+#if PG_VERSION_NUM >= 170000
+ case PGRES_TUPLES_CHUNK:
+ /* Added in PostgreSQL 17 */
#endif
case PGRES_COMMAND_OK:
case PGRES_TUPLES_OK:
#if PG_VERSION_NUM >= 90002
case PGRES_SINGLE_TUPLE:
/* Added in PostgreSQL 9.2 */
+#endif
+#if PG_VERSION_NUM >= 170000
+ case PGRES_TUPLES_CHUNK:
+ /* Added in PostgreSQL 17 */
#endif
case PGRES_TUPLES_OK:
{