-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.28 2006/07/31 10:15:30 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.29 2006/07/31 13:26:46 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
ECPGlog(const char *format,...)
{
va_list ap;
+ struct sqlca_t *sqlca = ECPGget_sqlca();
#ifdef ENABLE_THREAD_SAFETY
pthread_mutex_lock(&debug_mutex);
/* dump out internal sqlca variables */
if (getenv("ECPG_DONT_LOG_PID"))
fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
- sqlca.sqlcode, sqlca.sqlstate);
+ sqlca->sqlcode, sqlca->sqlstate);
fflush(debugstream);