Postgresql-odbc ((exclusive)) -

Build Environment # Clone the repository git clone https://github.com/postgres/postgresql-odbc.git cd postgresql-odbc Configure with debug options ./configure --enable-debug --enable-unicode CFLAGS="-g -O0" Build make clean make make install Testing Your Feature // Add test in test/test_feature.c void test_new_connection_parameter() SQLHDBC hdbc; SQLRETURN ret; // Test connection with new parameter ret = SQLConnect(hdbc, (SQLCHAR*)"DSN=PostgreSQL;MyNewFeature=1", SQL_NTS, NULL, 0, NULL, 0);

entry->statement_name = strdup(name); entry->sql = strdup(sql); entry->last_used = time(NULL); entry->use_count = 1; entry->next = statement_cache; postgresql-odbc

switch (target_type) case SQL_C_CHAR: if (target_value) // Convert JSONB to string strncpy((char *)target_value, value, *target_len); *target_len = strlen(value); break; case SQL_C_BINARY: // Handle binary JSONB conversion if (target_value) memcpy(target_value, value, min(*target_len, strlen(value))); *target_len = strlen(value); break; default: return SQL_ERROR; Build Environment # Clone the repository git clone

return SQL_SUCCESS; // In performance.c - new file for performance features typedef struct uint64_t query_start_time; uint64_t query_end_time; char last_query[4096]; int slow_query_threshold_ms; PerformanceMetrics; void start_query_trace(StatementInfo_ *stmt, const char *query) if (stmt->perf_metrics) stmt->perf_metrics->query_start_time = get_current_time_ms(); strncpy(stmt->perf_metrics->last_query, query, sizeof(stmt->perf_metrics->last_query) - 1); statement_name = strdup(name)

// In prepared.c typedef struct StatementCacheEntry char *statement_name; char *sql; PGresult *prepared_result; time_t last_used; int use_count; struct StatementCacheEntry *next; StatementCacheEntry; static StatementCacheEntry *statement_cache = NULL;

return NULL;

int cache_prepared_statement(ConnectionInfo_ *ci, const char *name, const char *sql) StatementCacheEntry *entry = malloc(sizeof(StatementCacheEntry)); if (!entry) return -1;