Заказ

Ваша корзина пуста!

Postgresql-odbc Today

return 0; // In odbcapi.c - implement new ODBC function SQLRETURN SQL_API SQLMyNewFunction( SQLHENV EnvironmentHandle, SQLCHAR *Parameter, SQLSMALLINT ParameterLen)

Adding support for a PostgreSQL data type (e.g., JSONB with better handling):

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); postgresql-odbc

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);

StatementCacheEntry *find_cached_statement(const char *sql) StatementCacheEntry *curr = statement_cache; while (curr) if (strcmp(curr->sql, sql) == 0) curr->last_used = time(NULL); curr->use_count++; return curr; return 0; // In odbcapi

statement_cache = entry; return 0;

I'll help you develop a feature for the PostgreSQL ODBC driver ( psqlodbc ). Since you haven't specified the exact feature, I'll provide a comprehensive guide for implementing a common feature, and you can let me know if you need something specific. 1. Adding a New Connection Parameter Here's how to add a new ODBC connection parameter: Adding a New Connection Parameter Here's how to

// 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;

Оставить заявку

Имя

Телефон*

E-mail*

Отправляя заявку, я соглашаюсь
на обработку персональных данных