PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
misc.c File Reference
#include "postgres_fe.h"
#include <limits.h>
#include <unistd.h>
#include "ecpg-pthread-win32.h"
#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpgerrno.h"
#include "extern.h"
#include "sqlca.h"
#include "pgtypes_numeric.h"
#include "pgtypes_date.h"
#include "pgtypes_timestamp.h"
#include "pgtypes_interval.h"
#include "pg_config_paths.h"
Include dependency graph for misc.c:

Go to the source code of this file.

Macros

#define POSTGRES_ECPG_INTERNAL
 

Functions

void ecpg_init_sqlca (struct sqlca_t *sqlca)
 
bool ecpg_init (const struct connection *con, const char *connection_name, const int lineno)
 
struct sqlca_tECPGget_sqlca (void)
 
bool ECPGstatus (int lineno, const char *connection_name)
 
PGTransactionStatusType ECPGtransactionStatus (const char *connection_name)
 
bool ECPGtrans (int lineno, const char *connection_name, const char *transaction)
 
void ECPGdebug (int n, FILE *dbgs)
 
void ecpg_log (const char *format,...)
 
void ECPGset_noind_null (enum ECPGttype type, void *ptr)
 
static bool _check (unsigned char *ptr, int length)
 
bool ECPGis_noind_null (enum ECPGttype type, void *ptr)
 
void ECPGset_var (int number, void *pointer, int lineno)
 
void * ECPGget_var (int number)
 

Variables

bool ecpg_internal_regression_mode = false
 
static struct sqlca_t sqlca_init
 
static struct sqlca_t sqlca
 
static int simple_debug = 0
 
static FILE * debugstream = NULL
 
struct var_listivlist = NULL
 

Macro Definition Documentation

#define POSTGRES_ECPG_INTERNAL

Definition at line 3 of file misc.c.

Function Documentation

static bool _check ( unsigned char *  ptr,
int  length 
)
static

Definition at line 378 of file misc.c.

Referenced by ECPGis_noind_null().

379 {
380  for (length--; length >= 0; length--)
381  if (ptr[length] != 0xff)
382  return false;
383 
384  return true;
385 }
int length(const List *list)
Definition: list.c:1271
bool ecpg_init ( const struct connection con,
const char *  connection_name,
const int  lineno 
)

Definition at line 105 of file misc.c.

References ecpg_gettext, ecpg_init_sqlca(), ECPG_NO_CONN, ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, and ECPGget_sqlca().

Referenced by ecpg_do_prologue(), ECPGdeallocate(), ECPGdisconnect(), ECPGprepare(), ECPGsetcommit(), ECPGsetconn(), ECPGstatus(), and ECPGtrans().

106 {
107  struct sqlca_t *sqlca = ECPGget_sqlca();
108 
109  if (sqlca == NULL)
110  {
112  NULL);
113  return false;
114  }
115 
116  ecpg_init_sqlca(sqlca);
117  if (con == NULL)
118  {
120  connection_name ? connection_name : ecpg_gettext("NULL"));
121  return false;
122  }
123 
124  return true;
125 }
void ecpg_init_sqlca(struct sqlca_t *sqlca)
Definition: misc.c:99
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY
Definition: extern.h:221
#define ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST
Definition: extern.h:206
#define ECPG_OUT_OF_MEMORY
Definition: ecpgerrno.h:15
struct sqlca_t * ECPGget_sqlca(void)
Definition: misc.c:142
Definition: sqlca.h:19
void ecpg_raise(int line, int code, const char *sqlstate, const char *str)
Definition: error.c:13
#define ecpg_gettext(x)
Definition: ecpglib.h:18
static struct sqlca_t sqlca
Definition: misc.c:63
#define ECPG_NO_CONN
Definition: ecpgerrno.h:36
void ecpg_init_sqlca ( struct sqlca_t sqlca)

Definition at line 99 of file misc.c.

Referenced by ecpg_init(), ECPGallocate_desc(), ECPGconnect(), ECPGdeallocate_desc(), ECPGdisconnect(), ECPGget_desc(), ECPGget_desc_header(), and ECPGget_sqlca().

100 {
101  memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
102 }
Definition: sqlca.h:19
static struct sqlca_t sqlca_init
Definition: misc.c:32
void ecpg_log ( const char *  format,
  ... 
)

Definition at line 267 of file misc.c.

References debugstream, ecpg_gettext, ecpg_internal_regression_mode, ECPGget_sqlca(), free, malloc, pthread_mutex_lock(), pthread_mutex_unlock(), simple_debug, snprintf(), sqlca_t::sqlcode, and sqlca_t::sqlstate.

Referenced by ECPGdebug(), and ECPGtrans().

268 {
269  va_list ap;
270  struct sqlca_t *sqlca = ECPGget_sqlca();
271  const char *intl_format;
272  int bufsize;
273  char *fmt;
274 
275  if (!simple_debug)
276  return;
277 
278  /* localize the error message string */
279  intl_format = ecpg_gettext(format);
280 
281  /*
282  * Insert PID into the format, unless ecpg_internal_regression_mode is set
283  * (regression tests want unchanging output).
284  */
285  bufsize = strlen(intl_format) + 100;
286  fmt = (char *) malloc(bufsize);
287  if (fmt == NULL)
288  return;
289 
291  snprintf(fmt, bufsize, "[NO_PID]: %s", intl_format);
292  else
293  snprintf(fmt, bufsize, "[%d]: %s", (int) getpid(), intl_format);
294 
295 #ifdef ENABLE_THREAD_SAFETY
296  pthread_mutex_lock(&debug_mutex);
297 #endif
298 
299  va_start(ap, format);
300  vfprintf(debugstream, fmt, ap);
301  va_end(ap);
302 
303  /* dump out internal sqlca variables */
304  if (ecpg_internal_regression_mode && sqlca != NULL)
305  {
306  fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
307  sqlca->sqlcode, sqlca->sqlstate);
308  }
309 
310  fflush(debugstream);
311 
312 #ifdef ENABLE_THREAD_SAFETY
313  pthread_mutex_unlock(&debug_mutex);
314 #endif
315 
316  free(fmt);
317 }
int snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3
#define malloc(a)
Definition: header.h:50
struct sqlca_t * ECPGget_sqlca(void)
Definition: misc.c:142
Definition: sqlca.h:19
int pthread_mutex_lock(pthread_mutex_t *mp)
Definition: pthread-win32.c:45
static int simple_debug
Definition: misc.c:95
char sqlstate[5]
Definition: sqlca.h:53
int pthread_mutex_unlock(pthread_mutex_t *mp)
Definition: pthread-win32.c:54
long sqlcode
Definition: sqlca.h:23
static FILE * debugstream
Definition: misc.c:96
#define ecpg_gettext(x)
Definition: ecpglib.h:18
#define free(a)
Definition: header.h:65
static struct sqlca_t sqlca
Definition: misc.c:63
bool ecpg_internal_regression_mode
Definition: misc.c:30
static char format
Definition: pg_basebackup.c:81
void ECPGdebug ( int  n,
FILE *  dbgs 
)

Definition at line 243 of file misc.c.

References debugstream, ecpg_internal_regression_mode, ecpg_log(), pthread_mutex_lock(), pthread_mutex_unlock(), and simple_debug.

244 {
245 #ifdef ENABLE_THREAD_SAFETY
246  pthread_mutex_lock(&debug_init_mutex);
247 #endif
248 
249  if (n > 100)
250  {
252  simple_debug = n - 100;
253  }
254  else
255  simple_debug = n;
256 
257  debugstream = dbgs;
258 
259  ecpg_log("ECPGdebug: set to %d\n", simple_debug);
260 
261 #ifdef ENABLE_THREAD_SAFETY
262  pthread_mutex_unlock(&debug_init_mutex);
263 #endif
264 }
int pthread_mutex_lock(pthread_mutex_t *mp)
Definition: pthread-win32.c:45
static int simple_debug
Definition: misc.c:95
int pthread_mutex_unlock(pthread_mutex_t *mp)
Definition: pthread-win32.c:54
static FILE * debugstream
Definition: misc.c:96
void ecpg_log(const char *format,...)
Definition: misc.c:267
bool ecpg_internal_regression_mode
Definition: misc.c:30
struct sqlca_t* ECPGget_sqlca ( void  )

Definition at line 142 of file misc.c.

References ecpg_init_sqlca(), malloc, pthread_getspecific(), pthread_setspecific(), and sqlca.

Referenced by ecpg_get_data(), ECPG_informix_reset_sqlca(), ecpg_init(), ecpg_log(), ecpg_process_output(), ecpg_raise(), ecpg_raise_backend(), ECPGallocate_desc(), ECPGconnect(), ECPGdeallocate_desc(), ECPGdisconnect(), ECPGget_desc(), ECPGget_desc_header(), ECPGnoticeReceiver(), ECPGset_var(), and sqlprint().

143 {
144 #ifdef ENABLE_THREAD_SAFETY
145  struct sqlca_t *sqlca;
146 
147  pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
148 
149  sqlca = pthread_getspecific(sqlca_key);
150  if (sqlca == NULL)
151  {
152  sqlca = malloc(sizeof(struct sqlca_t));
153  if (sqlca == NULL)
154  return NULL;
155  ecpg_init_sqlca(sqlca);
156  pthread_setspecific(sqlca_key, sqlca);
157  }
158  return sqlca;
159 #else
160  return &sqlca;
161 #endif
162 }
void ecpg_init_sqlca(struct sqlca_t *sqlca)
Definition: misc.c:99
#define malloc(a)
Definition: header.h:50
Definition: sqlca.h:19
void * pthread_getspecific(pthread_key_t key)
Definition: pthread-win32.c:29
static struct sqlca_t sqlca
Definition: misc.c:63
void pthread_setspecific(pthread_key_t key, void *val)
Definition: pthread-win32.c:24
void* ECPGget_var ( int  number)

Definition at line 568 of file misc.c.

References var_list::next, var_list::number, and var_list::pointer.

Referenced by ECPG_informix_get_var(), get_record1(), open_cur1(), and openit().

569 {
570  struct var_list *ptr;
571 
572  for (ptr = ivlist; ptr != NULL && ptr->number != number; ptr = ptr->next);
573  return (ptr) ? ptr->pointer : NULL;
574 }
struct var_list * next
Definition: extern.h:132
void * pointer
Definition: extern.h:131
int number
Definition: extern.h:130
struct var_list * ivlist
Definition: misc.c:521
bool ECPGis_noind_null ( enum ECPGttype  type,
void *  ptr 
)

Definition at line 388 of file misc.c.

References _check(), ECPGgeneric_varchar::arr, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, ECPGt_varchar, NUMERIC_NULL, and sign.

Referenced by ecpg_store_input(), and risnull().

389 {
390  switch (type)
391  {
392  case ECPGt_char:
393  case ECPGt_unsigned_char:
394  case ECPGt_string:
395  if (*((char *) ptr) == '\0')
396  return true;
397  break;
398  case ECPGt_short:
400  if (*((short int *) ptr) == SHRT_MIN)
401  return true;
402  break;
403  case ECPGt_int:
404  case ECPGt_unsigned_int:
405  if (*((int *) ptr) == INT_MIN)
406  return true;
407  break;
408  case ECPGt_long:
409  case ECPGt_unsigned_long:
410  case ECPGt_date:
411  if (*((long *) ptr) == LONG_MIN)
412  return true;
413  break;
414 #ifdef HAVE_LONG_LONG_INT
415  case ECPGt_long_long:
417  if (*((long long *) ptr) == LONG_LONG_MIN)
418  return true;
419  break;
420 #endif /* HAVE_LONG_LONG_INT */
421  case ECPGt_float:
422  return _check(ptr, sizeof(float));
423  break;
424  case ECPGt_double:
425  return _check(ptr, sizeof(double));
426  break;
427  case ECPGt_varchar:
428  if (*(((struct ECPGgeneric_varchar *) ptr)->arr) == 0x00)
429  return true;
430  break;
431  case ECPGt_decimal:
432  if (((decimal *) ptr)->sign == NUMERIC_NULL)
433  return true;
434  break;
435  case ECPGt_numeric:
436  if (((numeric *) ptr)->sign == NUMERIC_NULL)
437  return true;
438  break;
439  case ECPGt_interval:
440  return _check(ptr, sizeof(interval));
441  break;
442  case ECPGt_timestamp:
443  return _check(ptr, sizeof(timestamp));
444  break;
445  default:
446  break;
447  }
448 
449  return false;
450 }
int64 timestamp
#define NUMERIC_NULL
static bool _check(unsigned char *ptr, int length)
Definition: misc.c:378
char sign
Definition: informix.c:693
void ECPGset_noind_null ( enum ECPGttype  type,
void *  ptr 
)

Definition at line 320 of file misc.c.

References ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, ECPGt_varchar, and NUMERIC_NULL.

Referenced by ecpg_get_data(), ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), and rsetnull().

321 {
322  switch (type)
323  {
324  case ECPGt_char:
325  case ECPGt_unsigned_char:
326  case ECPGt_string:
327  *((char *) ptr) = '\0';
328  break;
329  case ECPGt_short:
331  *((short int *) ptr) = SHRT_MIN;
332  break;
333  case ECPGt_int:
334  case ECPGt_unsigned_int:
335  *((int *) ptr) = INT_MIN;
336  break;
337  case ECPGt_long:
338  case ECPGt_unsigned_long:
339  case ECPGt_date:
340  *((long *) ptr) = LONG_MIN;
341  break;
342 #ifdef HAVE_LONG_LONG_INT
343  case ECPGt_long_long:
345  *((long long *) ptr) = LONG_LONG_MIN;
346  break;
347 #endif /* HAVE_LONG_LONG_INT */
348  case ECPGt_float:
349  memset((char *) ptr, 0xff, sizeof(float));
350  break;
351  case ECPGt_double:
352  memset((char *) ptr, 0xff, sizeof(double));
353  break;
354  case ECPGt_varchar:
355  *(((struct ECPGgeneric_varchar *) ptr)->arr) = 0x00;
356  ((struct ECPGgeneric_varchar *) ptr)->len = 0;
357  break;
358  case ECPGt_decimal:
359  memset((char *) ptr, 0, sizeof(decimal));
360  ((decimal *) ptr)->sign = NUMERIC_NULL;
361  break;
362  case ECPGt_numeric:
363  memset((char *) ptr, 0, sizeof(numeric));
364  ((numeric *) ptr)->sign = NUMERIC_NULL;
365  break;
366  case ECPGt_interval:
367  memset((char *) ptr, 0xff, sizeof(interval));
368  break;
369  case ECPGt_timestamp:
370  memset((char *) ptr, 0xff, sizeof(timestamp));
371  break;
372  default:
373  break;
374  }
375 }
int64 timestamp
#define NUMERIC_NULL
void ECPGset_var ( int  number,
void *  pointer,
int  lineno 
)

Definition at line 524 of file misc.c.

References calloc, ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGfree_auto_mem(), ECPGget_sqlca(), ivlist, var_list::next, var_list::number, var_list::pointer, snprintf(), sqlca_t::sqlcode, sqlca_t::sqlerrm, sqlca_t::sqlerrmc, sqlca_t::sqlerrml, and sqlca_t::sqlstate.

Referenced by ECPG_informix_set_var(), get_var1(), and main().

525 {
526  struct var_list *ptr;
527 
528  for (ptr = ivlist; ptr != NULL; ptr = ptr->next)
529  {
530  if (ptr->number == number)
531  {
532  /* already known => just change pointer value */
533  ptr->pointer = pointer;
534  return;
535  }
536  }
537 
538  /* a new one has to be added */
539  ptr = (struct var_list *) calloc(1L, sizeof(struct var_list));
540  if (!ptr)
541  {
542  struct sqlca_t *sqlca = ECPGget_sqlca();
543 
544  if (sqlca == NULL)
545  {
548  return;
549  }
550 
551  sqlca->sqlcode = ECPG_OUT_OF_MEMORY;
552  strncpy(sqlca->sqlstate, "YE001", sizeof(sqlca->sqlstate));
553  snprintf(sqlca->sqlerrm.sqlerrmc, sizeof(sqlca->sqlerrm.sqlerrmc), "out of memory on line %d", lineno);
554  sqlca->sqlerrm.sqlerrml = strlen(sqlca->sqlerrm.sqlerrmc);
555  /* free all memory we have allocated for the user */
557  }
558  else
559  {
560  ptr->number = number;
561  ptr->pointer = pointer;
562  ptr->next = ivlist;
563  ivlist = ptr;
564  }
565 }
#define calloc(a, b)
Definition: header.h:55
struct var_list * next
Definition: extern.h:132
struct sqlca_t::@124 sqlerrm
void ECPGfree_auto_mem(void)
Definition: memory.c:138
void * pointer
Definition: extern.h:131
int sqlerrml
Definition: sqlca.h:26
int snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3
#define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY
Definition: extern.h:221
#define ECPG_OUT_OF_MEMORY
Definition: ecpgerrno.h:15
struct sqlca_t * ECPGget_sqlca(void)
Definition: misc.c:142
Definition: sqlca.h:19
int number
Definition: extern.h:130
char sqlstate[5]
Definition: sqlca.h:53
void ecpg_raise(int line, int code, const char *sqlstate, const char *str)
Definition: error.c:13
long sqlcode
Definition: sqlca.h:23
static struct sqlca_t sqlca
Definition: misc.c:63
char sqlerrmc[SQLERRMC_LEN]
Definition: sqlca.h:27
struct var_list * ivlist
Definition: misc.c:521
bool ECPGstatus ( int  lineno,
const char *  connection_name 
)

Definition at line 165 of file misc.c.

References connection::connection, ecpg_get_connection(), ecpg_init(), ECPG_NOT_CONN, ecpg_raise(), ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, and connection::name.

166 {
167  struct connection *con = ecpg_get_connection(connection_name);
168 
169  if (!ecpg_init(con, connection_name, lineno))
170  return false;
171 
172  /* are we connected? */
173  if (con->connection == NULL)
174  {
176  return false;
177  }
178 
179  return true;
180 }
#define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR
Definition: extern.h:220
#define ECPG_NOT_CONN
Definition: ecpgerrno.h:37
char * name
Definition: extern.h:81
void ecpg_raise(int line, int code, const char *sqlstate, const char *str)
Definition: error.c:13
PGconn * connection
Definition: extern.h:82
bool ecpg_init(const struct connection *con, const char *connection_name, const int lineno)
Definition: misc.c:105
struct connection * ecpg_get_connection(const char *connection_name)
Definition: connect.c:74
bool ECPGtrans ( int  lineno,
const char *  connection_name,
const char *  transaction 
)

Definition at line 199 of file misc.c.

References connection::autocommit, connection::connection, ecpg_check_PQresult(), ECPG_COMPAT_PGSQL, ecpg_get_connection(), ecpg_init(), ecpg_log(), FALSE, connection::name, PQclear(), PQexec(), PQTRANS_IDLE, and PQtransactionStatus().

Referenced by main(), and sql_check().

200 {
201  PGresult *res;
202  struct connection *con = ecpg_get_connection(connection_name);
203 
204  if (!ecpg_init(con, connection_name, lineno))
205  return false;
206 
207  ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
208 
209  /* if we have no connection we just simulate the command */
210  if (con && con->connection)
211  {
212  /*
213  * If we got a transaction command but have no open transaction, we
214  * have to start one, unless we are in autocommit, where the
215  * developers have to take care themselves. However, if the command is
216  * a begin statement, we just execute it once. And if the command is
217  * commit or rollback prepared, we don't execute it.
218  */
220  !con->autocommit &&
221  strncmp(transaction, "begin", 5) != 0 &&
222  strncmp(transaction, "start", 5) != 0 &&
223  strncmp(transaction, "commit prepared", 15) != 0 &&
224  strncmp(transaction, "rollback prepared", 17) != 0)
225  {
226  res = PQexec(con->connection, "begin transaction");
227  if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
228  return FALSE;
229  PQclear(res);
230  }
231 
232  res = PQexec(con->connection, transaction);
233  if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
234  return FALSE;
235  PQclear(res);
236  }
237 
238  return true;
239 }
char * name
Definition: extern.h:81
bool autocommit
Definition: extern.h:83
#define FALSE
Definition: c.h:219
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
Definition: fe-connect.c:6052
void ecpg_log(const char *format,...)
Definition: misc.c:267
void PQclear(PGresult *res)
Definition: fe-exec.c:671
PGconn * connection
Definition: extern.h:82
bool ecpg_init(const struct connection *con, const char *connection_name, const int lineno)
Definition: misc.c:105
bool ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat)
Definition: error.c:283
struct connection * ecpg_get_connection(const char *connection_name)
Definition: connect.c:74
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:1897
PGTransactionStatusType ECPGtransactionStatus ( const char *  connection_name)

Definition at line 183 of file misc.c.

References connection::connection, ecpg_get_connection(), PQTRANS_UNKNOWN, and PQtransactionStatus().

184 {
185  const struct connection *con;
186 
187  con = ecpg_get_connection(connection_name);
188  if (con == NULL)
189  {
190  /* transaction status is unknown */
191  return PQTRANS_UNKNOWN;
192  }
193 
194  return PQtransactionStatus(con->connection);
195 
196 }
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
Definition: fe-connect.c:6052
PGconn * connection
Definition: extern.h:82
struct connection * ecpg_get_connection(const char *connection_name)
Definition: connect.c:74

Variable Documentation

FILE* debugstream = NULL
static

Definition at line 96 of file misc.c.

Referenced by ecpg_log(), and ECPGdebug().

bool ecpg_internal_regression_mode = false

Definition at line 30 of file misc.c.

Referenced by ecpg_get_data(), ecpg_log(), ECPGconnect(), and ECPGdebug().

struct var_list* ivlist = NULL

Definition at line 521 of file misc.c.

Referenced by ecpg_finish(), and ECPGset_var().

int simple_debug = 0
static

Definition at line 95 of file misc.c.

Referenced by ecpg_log(), and ECPGdebug().

struct sqlca_t sqlca
static
Initial value:
=
{
{
'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
},
sizeof(struct sqlca_t),
0,
{
0,
{
0
}
},
{
'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
},
{
0, 0, 0, 0, 0, 0
},
{
0, 0, 0, 0, 0, 0, 0, 0
},
{
'0', '0', '0', '0', '0'
}
}
Definition: sqlca.h:19

Definition at line 63 of file misc.c.

Referenced by ECPGget_sqlca().

struct sqlca_t sqlca_init
static
Initial value:
=
{
{
'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '
},
sizeof(struct sqlca_t),
0,
{
0,
{
0
}
},
{
'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '
},
{
0, 0, 0, 0, 0, 0
},
{
0, 0, 0, 0, 0, 0, 0, 0
},
{
'0', '0', '0', '0', '0'
}
}
Definition: sqlca.h:19

Definition at line 32 of file misc.c.