PostgreSQL Source Code  git master
sqlca.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sqlca_t


#define SQLERRMC_LEN   150
#define sqlca   (*ECPGget_sqlca())


struct sqlca_tECPGget_sqlca (void)

Macro Definition Documentation



Definition at line 8 of file sqlca.h.

◆ sqlca

#define sqlca   (*ECPGget_sqlca())

Definition at line 59 of file sqlca.h.


#define SQLERRMC_LEN   150

Definition at line 12 of file sqlca.h.

Function Documentation

◆ ECPGget_sqlca()

struct sqlca_t* ECPGget_sqlca ( void  )

Definition at line 108 of file misc.c.

109 {
110  struct sqlca_t *sqlca;
112  pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
115  if (sqlca == NULL)
116  {
117  sqlca = malloc(sizeof(struct sqlca_t));
118  if (sqlca == NULL)
119  return NULL;
122  }
123  return sqlca;
124 }
#define malloc(a)
Definition: header.h:50
static pthread_key_t sqlca_key
Definition: misc.c:58
void ecpg_init_sqlca(struct sqlca_t *sqlca)
Definition: misc.c:67
static void ecpg_sqlca_key_init(void)
Definition: misc.c:102
static pthread_once_t sqlca_key_once
Definition: misc.c:59
void * pthread_getspecific(pthread_key_t key)
Definition: pthread-win32.c:29
void pthread_setspecific(pthread_key_t key, void *val)
Definition: pthread-win32.c:24
#define sqlca
Definition: sqlca.h:59
Definition: sqlca.h:20