Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Functions

sqlca.h File Reference

Go to the source code of this file.

Data Structures

struct  sqlca_t

Defines

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

Functions

struct sqlca_tECPGget_sqlca (void)

Define Documentation

#define PGDLLIMPORT

Definition at line 8 of file sqlca.h.

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

Definition at line 12 of file sqlca.h.


Function Documentation

struct sqlca_t* ECPGget_sqlca ( void   )  [read]

Definition at line 135 of file misc.c.

{
#ifdef ENABLE_THREAD_SAFETY
    struct sqlca_t *sqlca;

    pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);

    sqlca = pthread_getspecific(sqlca_key);
    if (sqlca == NULL)
    {
        sqlca = malloc(sizeof(struct sqlca_t));
        ecpg_init_sqlca(sqlca);
        pthread_setspecific(sqlca_key, sqlca);
    }
    return (sqlca);
#else
    return (&sqlca);
#endif
}