Fix indenting for 'extern "C"' cases.
This commit is contained in:
parent
e8192dc0d0
commit
77e4fd889c
|
@ -53,44 +53,50 @@ system(const char *command)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int pstat;
|
int pstat;
|
||||||
struct sigaction ign, intact, quitact;
|
struct sigaction ign,
|
||||||
sigset_t newsigblock, oldsigblock;
|
intact,
|
||||||
|
quitact;
|
||||||
|
sigset_t newsigblock,
|
||||||
|
oldsigblock;
|
||||||
|
|
||||||
if (!command) /* just checking... */
|
if (!command) /* just checking... */
|
||||||
return(1);
|
return (1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save
|
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save existing
|
||||||
* existing signal dispositions.
|
* signal dispositions.
|
||||||
*/
|
*/
|
||||||
ign.sa_handler = SIG_IGN;
|
ign.sa_handler = SIG_IGN;
|
||||||
(void)sigemptyset(&ign.sa_mask);
|
(void) sigemptyset(&ign.sa_mask);
|
||||||
ign.sa_flags = 0;
|
ign.sa_flags = 0;
|
||||||
(void)sigaction(SIGINT, &ign, &intact);
|
(void) sigaction(SIGINT, &ign, &intact);
|
||||||
(void)sigaction(SIGQUIT, &ign, &quitact);
|
(void) sigaction(SIGQUIT, &ign, &quitact);
|
||||||
(void)sigemptyset(&newsigblock);
|
(void) sigemptyset(&newsigblock);
|
||||||
(void)sigaddset(&newsigblock, SIGCHLD);
|
(void) sigaddset(&newsigblock, SIGCHLD);
|
||||||
(void)sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock);
|
(void) sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock);
|
||||||
switch(pid = fork()) {
|
switch (pid = fork())
|
||||||
|
{
|
||||||
case -1: /* error */
|
case -1: /* error */
|
||||||
break;
|
break;
|
||||||
case 0: /* child */
|
case 0: /* child */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Restore original signal dispositions and exec the command.
|
* Restore original signal dispositions and exec the command.
|
||||||
*/
|
*/
|
||||||
(void)sigaction(SIGINT, &intact, NULL);
|
(void) sigaction(SIGINT, &intact, NULL);
|
||||||
(void)sigaction(SIGQUIT, &quitact, NULL);
|
(void) sigaction(SIGQUIT, &quitact, NULL);
|
||||||
(void)sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
|
(void) sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
|
||||||
execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL);
|
execl(_PATH_BSHELL, "sh", "-c", command, (char *) NULL);
|
||||||
_exit(127);
|
_exit(127);
|
||||||
default: /* parent */
|
default: /* parent */
|
||||||
do {
|
do
|
||||||
pid = wait4(pid, &pstat, 0, (struct rusage *)0);
|
{
|
||||||
|
pid = wait4(pid, &pstat, 0, (struct rusage *) 0);
|
||||||
} while (pid == -1 && errno == EINTR);
|
} while (pid == -1 && errno == EINTR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
(void)sigaction(SIGINT, &intact, NULL);
|
(void) sigaction(SIGINT, &intact, NULL);
|
||||||
(void)sigaction(SIGQUIT, &quitact, NULL);
|
(void) sigaction(SIGQUIT, &quitact, NULL);
|
||||||
(void)sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
|
(void) sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
|
||||||
return(pid == -1 ? -1 : pstat);
|
return (pid == -1 ? -1 : pstat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: aix.h,v 1.9 2001/11/05 17:46:27 momjian Exp $
|
* $Id: aix.h,v 1.10 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
|
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
|
||||||
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
|
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
|
||||||
|
@ -31,23 +31,23 @@ extern "C"
|
||||||
* To be able to intialize, a library may provide a dl_info structure
|
* To be able to intialize, a library may provide a dl_info structure
|
||||||
* that contains functions to be called to initialize and terminate.
|
* that contains functions to be called to initialize and terminate.
|
||||||
*/
|
*/
|
||||||
struct dl_info
|
struct dl_info
|
||||||
{
|
{
|
||||||
void (*init) (void);
|
void (*init) (void);
|
||||||
void (*fini) (void);
|
void (*fini) (void);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if __STDC__ || defined(_IBMR2)
|
#if __STDC__ || defined(_IBMR2)
|
||||||
void *dlopen(const char *path, int mode);
|
void *dlopen(const char *path, int mode);
|
||||||
void *dlsym(void *handle, const char *symbol);
|
void *dlsym(void *handle, const char *symbol);
|
||||||
char *dlerror(void);
|
char *dlerror(void);
|
||||||
int dlclose(void *handle);
|
int dlclose(void *handle);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void *dlopen();
|
void *dlopen();
|
||||||
void *dlsym();
|
void *dlsym();
|
||||||
char *dlerror();
|
char *dlerror();
|
||||||
int dlclose();
|
int dlclose();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.6 2001/11/05 17:46:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.7 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -38,28 +38,28 @@ extern "C"
|
||||||
* There is one semaphore structure for each semaphore in the system.
|
* There is one semaphore structure for each semaphore in the system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct sem
|
struct sem
|
||||||
{
|
{
|
||||||
ushort_t semval; /* semaphore text map address */
|
ushort_t semval; /* semaphore text map address */
|
||||||
pid_t sempid; /* pid of last operation */
|
pid_t sempid; /* pid of last operation */
|
||||||
ushort_t semncnt; /* # awaiting semval > cval */
|
ushort_t semncnt; /* # awaiting semval > cval */
|
||||||
ushort_t semzcnt; /* # awaiting semval = 0 */
|
ushort_t semzcnt; /* # awaiting semval = 0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* User semaphore template for semop system calls.
|
* User semaphore template for semop system calls.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct sembuf
|
struct sembuf
|
||||||
{
|
{
|
||||||
ushort_t sem_num; /* semaphore # */
|
ushort_t sem_num; /* semaphore # */
|
||||||
short sem_op; /* semaphore operation */
|
short sem_op; /* semaphore operation */
|
||||||
short sem_flg; /* operation flags */
|
short sem_flg; /* operation flags */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
|
extern int semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
|
||||||
extern int semget(key_t key, int nsems, int semflg);
|
extern int semget(key_t key, int nsems, int semflg);
|
||||||
extern int semop(int semid, struct sembuf * sops, size_t nsops);
|
extern int semop(int semid, struct sembuf * sops, size_t nsops);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.6 2001/11/05 17:46:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.7 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -25,16 +25,16 @@ extern "C"
|
||||||
#define SHM_R 0400 /* read permission */
|
#define SHM_R 0400 /* read permission */
|
||||||
#define SHM_W 0200 /* write permission */
|
#define SHM_W 0200 /* write permission */
|
||||||
|
|
||||||
struct shmid_ds
|
struct shmid_ds
|
||||||
{
|
{
|
||||||
int dummy;
|
int dummy;
|
||||||
int shm_nattch;
|
int shm_nattch;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void *shmat(int shmid, const void *shmaddr, int shmflg);
|
extern void *shmat(int shmid, const void *shmaddr, int shmflg);
|
||||||
extern int shmdt(const void *addr);
|
extern int shmdt(const void *addr);
|
||||||
extern int shmctl(int shmid, int cmd, struct shmid_ds * buf);
|
extern int shmctl(int shmid, int cmd, struct shmid_ds * buf);
|
||||||
extern int shmget(key_t key, size_t size, int flags);
|
extern int shmget(key_t key, size_t size, int flags);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.115 2001/11/06 00:38:26 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.116 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: tgRecipe.h,v 1.21 2001/11/05 17:46:28 momjian Exp $
|
* $Id: tgRecipe.h,v 1.22 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -29,6 +29,7 @@ typedef struct
|
||||||
y;
|
y;
|
||||||
} Point; /* this should match whatever is in
|
} Point; /* this should match whatever is in
|
||||||
|
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* geo-decls.h */
|
* geo-decls.h */
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
*
|
*
|
||||||
* spi.h
|
* spi.h
|
||||||
*
|
*
|
||||||
* $Id: spi.h,v 1.32 2001/11/05 19:41:56 tgl Exp $
|
* $Id: spi.h,v 1.33 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/include/port/darwin/Attic/sem.h,v 1.5 2001/11/05 17:46:35 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/include/port/darwin/Attic/sem.h,v 1.6 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -44,28 +44,28 @@ extern "C"
|
||||||
* There is one semaphore structure for each semaphore in the system.
|
* There is one semaphore structure for each semaphore in the system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct sem
|
struct sem
|
||||||
{
|
{
|
||||||
ushort_t semval; /* semaphore text map address */
|
ushort_t semval; /* semaphore text map address */
|
||||||
pid_t sempid; /* pid of last operation */
|
pid_t sempid; /* pid of last operation */
|
||||||
ushort_t semncnt; /* # awaiting semval > cval */
|
ushort_t semncnt; /* # awaiting semval > cval */
|
||||||
ushort_t semzcnt; /* # awaiting semval = 0 */
|
ushort_t semzcnt; /* # awaiting semval = 0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* User semaphore template for semop system calls.
|
* User semaphore template for semop system calls.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct sembuf
|
struct sembuf
|
||||||
{
|
{
|
||||||
ushort_t sem_num; /* semaphore # */
|
ushort_t sem_num; /* semaphore # */
|
||||||
short sem_op; /* semaphore operation */
|
short sem_op; /* semaphore operation */
|
||||||
short sem_flg; /* operation flags */
|
short sem_flg; /* operation flags */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
|
extern int semctl(int semid, int semnum, int cmd, /* ... */ union semun arg);
|
||||||
extern int semget(key_t key, int nsems, int semflg);
|
extern int semget(key_t key, int nsems, int semflg);
|
||||||
extern int semop(int semid, struct sembuf * sops, size_t nsops);
|
extern int semop(int semid, struct sembuf * sops, size_t nsops);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,23 +35,23 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ECPGdebug(int, FILE *);
|
void ECPGdebug(int, FILE *);
|
||||||
bool ECPGstatus(int, const char *);
|
bool ECPGstatus(int, const char *);
|
||||||
bool ECPGsetcommit(int, const char *, const char *);
|
bool ECPGsetcommit(int, const char *, const char *);
|
||||||
bool ECPGsetconn(int, const char *);
|
bool ECPGsetconn(int, const char *);
|
||||||
bool ECPGconnect(int, const char *, const char *, const char *, const char *, int);
|
bool ECPGconnect(int, const char *, const char *, const char *, const char *, int);
|
||||||
bool ECPGdo(int, const char *, char *,...);
|
bool ECPGdo(int, const char *, char *,...);
|
||||||
bool ECPGtrans(int, const char *, const char *);
|
bool ECPGtrans(int, const char *, const char *);
|
||||||
bool ECPGdisconnect(int, const char *);
|
bool ECPGdisconnect(int, const char *);
|
||||||
bool ECPGprepare(int, char *, char *);
|
bool ECPGprepare(int, char *, char *);
|
||||||
bool ECPGdeallocate(int, char *);
|
bool ECPGdeallocate(int, char *);
|
||||||
bool ECPGdeallocate_all(int);
|
bool ECPGdeallocate_all(int);
|
||||||
char *ECPGprepared_statement(char *);
|
char *ECPGprepared_statement(char *);
|
||||||
|
|
||||||
void ECPGlog(const char *format,...);
|
void ECPGlog(const char *format,...);
|
||||||
|
|
||||||
/* print an error message */
|
/* print an error message */
|
||||||
void sqlprint(void);
|
void sqlprint(void);
|
||||||
|
|
||||||
/* define this for simplicity as well as compatibility */
|
/* define this for simplicity as well as compatibility */
|
||||||
|
|
||||||
|
@ -59,16 +59,15 @@ extern "C"
|
||||||
|
|
||||||
/* dynamic SQL */
|
/* dynamic SQL */
|
||||||
|
|
||||||
bool ECPGdo_descriptor(int line, const char *connection,
|
bool ECPGdo_descriptor(int line, const char *connection,
|
||||||
const char *descriptor, const char *query);
|
const char *descriptor, const char *query);
|
||||||
bool ECPGdeallocate_desc(int line, const char *name);
|
bool ECPGdeallocate_desc(int line, const char *name);
|
||||||
bool ECPGallocate_desc(int line, const char *name);
|
bool ECPGallocate_desc(int line, const char *name);
|
||||||
void ECPGraise(int line, int code, const char *str);
|
void ECPGraise(int line, int code, const char *str);
|
||||||
bool ECPGget_desc_header(int, char *, int *);
|
bool ECPGget_desc_header(int, char *, int *);
|
||||||
bool ECPGget_desc(int, char *, int,...);
|
bool ECPGget_desc(int, char *, int,...);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum ECPGttype
|
enum ECPGttype
|
||||||
{
|
{
|
||||||
ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
|
ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
|
||||||
ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
|
ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
|
||||||
ECPGt_bool,
|
ECPGt_bool,
|
||||||
|
@ -48,11 +48,11 @@ extern "C"
|
||||||
ECPGt_NO_INDICATOR, /* no indicator */
|
ECPGt_NO_INDICATOR, /* no indicator */
|
||||||
ECPGt_long_long, ECPGt_unsigned_long_long,
|
ECPGt_long_long, ECPGt_unsigned_long_long,
|
||||||
ECPGt_descriptor /* sql descriptor, no C variable */
|
ECPGt_descriptor /* sql descriptor, no C variable */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* descriptor items */
|
/* descriptor items */
|
||||||
enum ECPGdtype
|
enum ECPGdtype
|
||||||
{
|
{
|
||||||
ECPGd_count = 1,
|
ECPGd_count = 1,
|
||||||
ECPGd_data,
|
ECPGd_data,
|
||||||
ECPGd_di_code,
|
ECPGd_di_code,
|
||||||
|
@ -70,11 +70,10 @@ extern "C"
|
||||||
ECPGd_type,
|
ECPGd_type,
|
||||||
ECPGd_EODT, /* End of descriptor types. */
|
ECPGd_EODT, /* End of descriptor types. */
|
||||||
ECPGd_cardinality
|
ECPGd_cardinality
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IS_SIMPLE_TYPE(type) (((type) >= ECPGt_char && (type) <= ECPGt_varchar2) || ((type)>=ECPGt_long_long && (type) <= ECPGt_unsigned_long_long))
|
#define IS_SIMPLE_TYPE(type) (((type) >= ECPGt_char && (type) <= ECPGt_varchar2) || ((type)>=ECPGt_long_long && (type) <= ECPGt_unsigned_long_long))
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,8 +16,8 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct sqlca
|
struct sqlca
|
||||||
{
|
{
|
||||||
char sqlcaid[8];
|
char sqlcaid[8];
|
||||||
long sqlabc;
|
long sqlabc;
|
||||||
long sqlcode;
|
long sqlcode;
|
||||||
|
@ -51,9 +51,9 @@ extern "C"
|
||||||
/* 7: empty */
|
/* 7: empty */
|
||||||
|
|
||||||
char sqlext[8];
|
char sqlext[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DLLIMPORT struct sqlca sqlca;
|
extern DLLIMPORT struct sqlca sqlca;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.61 2001/11/08 04:05:13 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.62 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: libpq-fe.h,v 1.79 2001/11/05 17:46:37 momjian Exp $
|
* $Id: libpq-fe.h,v 1.80 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -35,21 +35,20 @@ extern "C"
|
||||||
|
|
||||||
/* Application-visible enum types */
|
/* Application-visible enum types */
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Although you may decide to change this list in some way, values
|
* Although you may decide to change this list in some way, values
|
||||||
* which become unused should never be removed, nor should
|
* which become unused should never be removed, nor should constants
|
||||||
* constants be redefined - that would break compatibility with
|
* be redefined - that would break compatibility with existing code.
|
||||||
* existing code.
|
|
||||||
*/
|
*/
|
||||||
CONNECTION_OK,
|
CONNECTION_OK,
|
||||||
CONNECTION_BAD,
|
CONNECTION_BAD,
|
||||||
/* Non-blocking mode only below here */
|
/* Non-blocking mode only below here */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The existence of these should never be relied upon - they
|
* The existence of these should never be relied upon - they should
|
||||||
* should only be used for user feedback or similar purposes.
|
* only be used for user feedback or similar purposes.
|
||||||
*/
|
*/
|
||||||
CONNECTION_STARTED, /* Waiting for connection to be made. */
|
CONNECTION_STARTED, /* Waiting for connection to be made. */
|
||||||
CONNECTION_MADE, /* Connection OK; waiting to send. */
|
CONNECTION_MADE, /* Connection OK; waiting to send. */
|
||||||
|
@ -58,19 +57,19 @@ extern "C"
|
||||||
CONNECTION_AUTH_OK, /* Received authentication; waiting for
|
CONNECTION_AUTH_OK, /* Received authentication; waiting for
|
||||||
* backend startup. */
|
* backend startup. */
|
||||||
CONNECTION_SETENV /* Negotiating environment. */
|
CONNECTION_SETENV /* Negotiating environment. */
|
||||||
} ConnStatusType;
|
} ConnStatusType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
PGRES_POLLING_FAILED = 0,
|
PGRES_POLLING_FAILED = 0,
|
||||||
PGRES_POLLING_READING, /* These two indicate that one may */
|
PGRES_POLLING_READING, /* These two indicate that one may */
|
||||||
PGRES_POLLING_WRITING, /* use select before polling again. */
|
PGRES_POLLING_WRITING, /* use select before polling again. */
|
||||||
PGRES_POLLING_OK,
|
PGRES_POLLING_OK,
|
||||||
PGRES_POLLING_ACTIVE /* Can call poll function immediately. */
|
PGRES_POLLING_ACTIVE /* Can call poll function immediately. */
|
||||||
} PostgresPollingStatusType;
|
} PostgresPollingStatusType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
PGRES_EMPTY_QUERY = 0,
|
PGRES_EMPTY_QUERY = 0,
|
||||||
PGRES_COMMAND_OK, /* a query command that doesn't return
|
PGRES_COMMAND_OK, /* a query command that doesn't return
|
||||||
* anything was executed properly by the
|
* anything was executed properly by the
|
||||||
|
@ -84,19 +83,19 @@ extern "C"
|
||||||
* the backend */
|
* the backend */
|
||||||
PGRES_NONFATAL_ERROR,
|
PGRES_NONFATAL_ERROR,
|
||||||
PGRES_FATAL_ERROR
|
PGRES_FATAL_ERROR
|
||||||
} ExecStatusType;
|
} ExecStatusType;
|
||||||
|
|
||||||
/* PGconn encapsulates a connection to the backend.
|
/* PGconn encapsulates a connection to the backend.
|
||||||
* The contents of this struct are not supposed to be known to applications.
|
* The contents of this struct are not supposed to be known to applications.
|
||||||
*/
|
*/
|
||||||
typedef struct pg_conn PGconn;
|
typedef struct pg_conn PGconn;
|
||||||
|
|
||||||
/* PGresult encapsulates the result of a query (or more precisely, of a single
|
/* PGresult encapsulates the result of a query (or more precisely, of a single
|
||||||
* SQL command --- a query string given to PQsendQuery can contain multiple
|
* SQL command --- a query string given to PQsendQuery can contain multiple
|
||||||
* commands and thus return multiple PGresult objects).
|
* commands and thus return multiple PGresult objects).
|
||||||
* The contents of this struct are not supposed to be known to applications.
|
* The contents of this struct are not supposed to be known to applications.
|
||||||
*/
|
*/
|
||||||
typedef struct pg_result PGresult;
|
typedef struct pg_result PGresult;
|
||||||
|
|
||||||
/* PGnotify represents the occurrence of a NOTIFY message.
|
/* PGnotify represents the occurrence of a NOTIFY message.
|
||||||
* Ideally this would be an opaque typedef, but it's so simple that it's
|
* Ideally this would be an opaque typedef, but it's so simple that it's
|
||||||
|
@ -104,22 +103,22 @@ extern "C"
|
||||||
* NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
|
* NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
|
||||||
* whereas in earlier versions it was always your own backend's PID.
|
* whereas in earlier versions it was always your own backend's PID.
|
||||||
*/
|
*/
|
||||||
typedef struct pgNotify
|
typedef struct pgNotify
|
||||||
{
|
{
|
||||||
char relname[NAMEDATALEN]; /* name of relation
|
char relname[NAMEDATALEN]; /* name of relation containing
|
||||||
* containing data */
|
* data */
|
||||||
int be_pid; /* process id of backend */
|
int be_pid; /* process id of backend */
|
||||||
} PGnotify;
|
} PGnotify;
|
||||||
|
|
||||||
/* PQnoticeProcessor is the function type for the notice-message callback.
|
/* PQnoticeProcessor is the function type for the notice-message callback.
|
||||||
*/
|
*/
|
||||||
typedef void (*PQnoticeProcessor) (void *arg, const char *message);
|
typedef void (*PQnoticeProcessor) (void *arg, const char *message);
|
||||||
|
|
||||||
/* Print options for PQprint() */
|
/* Print options for PQprint() */
|
||||||
typedef char pqbool;
|
typedef char pqbool;
|
||||||
|
|
||||||
typedef struct _PQprintOpt
|
typedef struct _PQprintOpt
|
||||||
{
|
{
|
||||||
pqbool header; /* print output field headings and row
|
pqbool header; /* print output field headings and row
|
||||||
* count */
|
* count */
|
||||||
pqbool align; /* fill align the fields */
|
pqbool align; /* fill align the fields */
|
||||||
|
@ -132,7 +131,7 @@ extern "C"
|
||||||
char *caption; /* HTML <caption> */
|
char *caption; /* HTML <caption> */
|
||||||
char **fieldName; /* null terminated array of repalcement
|
char **fieldName; /* null terminated array of repalcement
|
||||||
* field names */
|
* field names */
|
||||||
} PQprintOpt;
|
} PQprintOpt;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Structure for the conninfo parameter definitions returned by PQconndefaults
|
* Structure for the conninfo parameter definitions returned by PQconndefaults
|
||||||
|
@ -142,8 +141,8 @@ extern "C"
|
||||||
* will release both the val strings and the PQconninfoOption array itself.
|
* will release both the val strings and the PQconninfoOption array itself.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
typedef struct _PQconninfoOption
|
typedef struct _PQconninfoOption
|
||||||
{
|
{
|
||||||
char *keyword; /* The keyword of the option */
|
char *keyword; /* The keyword of the option */
|
||||||
char *envvar; /* Fallback environment variable name */
|
char *envvar; /* Fallback environment variable name */
|
||||||
char *compiled; /* Fallback compiled in default value */
|
char *compiled; /* Fallback compiled in default value */
|
||||||
|
@ -155,14 +154,14 @@ extern "C"
|
||||||
* Password field - hide value "D" Debug
|
* Password field - hide value "D" Debug
|
||||||
* option - don't show by default */
|
* option - don't show by default */
|
||||||
int dispsize; /* Field size in characters for dialog */
|
int dispsize; /* Field size in characters for dialog */
|
||||||
} PQconninfoOption;
|
} PQconninfoOption;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* PQArgBlock -- structure for PQfn() arguments
|
* PQArgBlock -- structure for PQfn() arguments
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
int isint;
|
int isint;
|
||||||
union
|
union
|
||||||
|
@ -170,7 +169,7 @@ extern "C"
|
||||||
int *ptr; /* can't use void (dec compiler barfs) */
|
int *ptr; /* can't use void (dec compiler barfs) */
|
||||||
int integer;
|
int integer;
|
||||||
} u;
|
} u;
|
||||||
} PQArgBlock;
|
} PQArgBlock;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* Exported functions of libpq
|
* Exported functions of libpq
|
||||||
|
@ -181,12 +180,12 @@ extern "C"
|
||||||
|
|
||||||
/* make a new client connection to the backend */
|
/* make a new client connection to the backend */
|
||||||
/* Asynchronous (non-blocking) */
|
/* Asynchronous (non-blocking) */
|
||||||
extern PGconn *PQconnectStart(const char *conninfo);
|
extern PGconn *PQconnectStart(const char *conninfo);
|
||||||
extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
||||||
|
|
||||||
/* Synchronous (blocking) */
|
/* Synchronous (blocking) */
|
||||||
extern PGconn *PQconnectdb(const char *conninfo);
|
extern PGconn *PQconnectdb(const char *conninfo);
|
||||||
extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
|
extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
|
||||||
const char *pgoptions, const char *pgtty,
|
const char *pgoptions, const char *pgtty,
|
||||||
const char *dbName,
|
const char *dbName,
|
||||||
const char *login, const char *pwd);
|
const char *login, const char *pwd);
|
||||||
|
@ -195,97 +194,97 @@ extern "C"
|
||||||
PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
|
PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
|
||||||
|
|
||||||
/* close the current connection and free the PGconn data structure */
|
/* close the current connection and free the PGconn data structure */
|
||||||
extern void PQfinish(PGconn *conn);
|
extern void PQfinish(PGconn *conn);
|
||||||
|
|
||||||
/* get info about connection options known to PQconnectdb */
|
/* get info about connection options known to PQconnectdb */
|
||||||
extern PQconninfoOption *PQconndefaults(void);
|
extern PQconninfoOption *PQconndefaults(void);
|
||||||
|
|
||||||
/* free the data structure returned by PQconndefaults() */
|
/* free the data structure returned by PQconndefaults() */
|
||||||
extern void PQconninfoFree(PQconninfoOption *connOptions);
|
extern void PQconninfoFree(PQconninfoOption *connOptions);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* close the current connection and restablish a new one with the same
|
* close the current connection and restablish a new one with the same
|
||||||
* parameters
|
* parameters
|
||||||
*/
|
*/
|
||||||
/* Asynchronous (non-blocking) */
|
/* Asynchronous (non-blocking) */
|
||||||
extern int PQresetStart(PGconn *conn);
|
extern int PQresetStart(PGconn *conn);
|
||||||
extern PostgresPollingStatusType PQresetPoll(PGconn *conn);
|
extern PostgresPollingStatusType PQresetPoll(PGconn *conn);
|
||||||
|
|
||||||
/* Synchronous (blocking) */
|
/* Synchronous (blocking) */
|
||||||
extern void PQreset(PGconn *conn);
|
extern void PQreset(PGconn *conn);
|
||||||
|
|
||||||
/* issue a cancel request */
|
/* issue a cancel request */
|
||||||
extern int PQrequestCancel(PGconn *conn);
|
extern int PQrequestCancel(PGconn *conn);
|
||||||
|
|
||||||
/* Accessor functions for PGconn objects */
|
/* Accessor functions for PGconn objects */
|
||||||
extern char *PQdb(const PGconn *conn);
|
extern char *PQdb(const PGconn *conn);
|
||||||
extern char *PQuser(const PGconn *conn);
|
extern char *PQuser(const PGconn *conn);
|
||||||
extern char *PQpass(const PGconn *conn);
|
extern char *PQpass(const PGconn *conn);
|
||||||
extern char *PQhost(const PGconn *conn);
|
extern char *PQhost(const PGconn *conn);
|
||||||
extern char *PQport(const PGconn *conn);
|
extern char *PQport(const PGconn *conn);
|
||||||
extern char *PQtty(const PGconn *conn);
|
extern char *PQtty(const PGconn *conn);
|
||||||
extern char *PQoptions(const PGconn *conn);
|
extern char *PQoptions(const PGconn *conn);
|
||||||
extern ConnStatusType PQstatus(const PGconn *conn);
|
extern ConnStatusType PQstatus(const PGconn *conn);
|
||||||
extern char *PQerrorMessage(const PGconn *conn);
|
extern char *PQerrorMessage(const PGconn *conn);
|
||||||
extern int PQsocket(const PGconn *conn);
|
extern int PQsocket(const PGconn *conn);
|
||||||
extern int PQbackendPID(const PGconn *conn);
|
extern int PQbackendPID(const PGconn *conn);
|
||||||
extern int PQclientEncoding(const PGconn *conn);
|
extern int PQclientEncoding(const PGconn *conn);
|
||||||
extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
|
extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
|
||||||
|
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
/* Get the SSL structure associated with a connection */
|
/* Get the SSL structure associated with a connection */
|
||||||
extern SSL *PQgetssl(PGconn *conn);
|
extern SSL *PQgetssl(PGconn *conn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Enable/disable tracing */
|
/* Enable/disable tracing */
|
||||||
extern void PQtrace(PGconn *conn, FILE *debug_port);
|
extern void PQtrace(PGconn *conn, FILE *debug_port);
|
||||||
extern void PQuntrace(PGconn *conn);
|
extern void PQuntrace(PGconn *conn);
|
||||||
|
|
||||||
/* Override default notice processor */
|
/* Override default notice processor */
|
||||||
extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
||||||
PQnoticeProcessor proc,
|
PQnoticeProcessor proc,
|
||||||
void *arg);
|
void *arg);
|
||||||
|
|
||||||
/* === in fe-exec.c === */
|
/* === in fe-exec.c === */
|
||||||
|
|
||||||
/* Quoting strings before inclusion in queries. */
|
/* Quoting strings before inclusion in queries. */
|
||||||
extern size_t PQescapeString(char *to, const char *from, size_t length);
|
extern size_t PQescapeString(char *to, const char *from, size_t length);
|
||||||
extern unsigned char *PQescapeBytea(unsigned char *bintext, size_t binlen,
|
extern unsigned char *PQescapeBytea(unsigned char *bintext, size_t binlen,
|
||||||
size_t *bytealen);
|
size_t *bytealen);
|
||||||
|
|
||||||
/* Simple synchronous query */
|
/* Simple synchronous query */
|
||||||
extern PGresult *PQexec(PGconn *conn, const char *query);
|
extern PGresult *PQexec(PGconn *conn, const char *query);
|
||||||
extern PGnotify *PQnotifies(PGconn *conn);
|
extern PGnotify *PQnotifies(PGconn *conn);
|
||||||
extern void PQfreeNotify(PGnotify *notify);
|
extern void PQfreeNotify(PGnotify *notify);
|
||||||
|
|
||||||
/* Interface for multiple-result or asynchronous queries */
|
/* Interface for multiple-result or asynchronous queries */
|
||||||
extern int PQsendQuery(PGconn *conn, const char *query);
|
extern int PQsendQuery(PGconn *conn, const char *query);
|
||||||
extern PGresult *PQgetResult(PGconn *conn);
|
extern PGresult *PQgetResult(PGconn *conn);
|
||||||
|
|
||||||
/* Routines for managing an asychronous query */
|
/* Routines for managing an asychronous query */
|
||||||
extern int PQisBusy(PGconn *conn);
|
extern int PQisBusy(PGconn *conn);
|
||||||
extern int PQconsumeInput(PGconn *conn);
|
extern int PQconsumeInput(PGconn *conn);
|
||||||
|
|
||||||
/* Routines for copy in/out */
|
/* Routines for copy in/out */
|
||||||
extern int PQgetline(PGconn *conn, char *string, int length);
|
extern int PQgetline(PGconn *conn, char *string, int length);
|
||||||
extern int PQputline(PGconn *conn, const char *string);
|
extern int PQputline(PGconn *conn, const char *string);
|
||||||
extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
|
extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
|
||||||
extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
|
extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
|
||||||
extern int PQendcopy(PGconn *conn);
|
extern int PQendcopy(PGconn *conn);
|
||||||
|
|
||||||
/* Set blocking/nonblocking connection to the backend */
|
/* Set blocking/nonblocking connection to the backend */
|
||||||
extern int PQsetnonblocking(PGconn *conn, int arg);
|
extern int PQsetnonblocking(PGconn *conn, int arg);
|
||||||
extern int PQisnonblocking(const PGconn *conn);
|
extern int PQisnonblocking(const PGconn *conn);
|
||||||
|
|
||||||
/* Force the write buffer to be written (or at least try) */
|
/* Force the write buffer to be written (or at least try) */
|
||||||
extern int PQflush(PGconn *conn);
|
extern int PQflush(PGconn *conn);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "Fast path" interface --- not really recommended for application
|
* "Fast path" interface --- not really recommended for application
|
||||||
* use
|
* use
|
||||||
*/
|
*/
|
||||||
extern PGresult *PQfn(PGconn *conn,
|
extern PGresult *PQfn(PGconn *conn,
|
||||||
int fnid,
|
int fnid,
|
||||||
int *result_buf,
|
int *result_buf,
|
||||||
int *result_len,
|
int *result_len,
|
||||||
|
@ -294,82 +293,83 @@ extern "C"
|
||||||
int nargs);
|
int nargs);
|
||||||
|
|
||||||
/* Accessor functions for PGresult objects */
|
/* Accessor functions for PGresult objects */
|
||||||
extern ExecStatusType PQresultStatus(const PGresult *res);
|
extern ExecStatusType PQresultStatus(const PGresult *res);
|
||||||
extern char *PQresStatus(ExecStatusType status);
|
extern char *PQresStatus(ExecStatusType status);
|
||||||
extern char *PQresultErrorMessage(const PGresult *res);
|
extern char *PQresultErrorMessage(const PGresult *res);
|
||||||
extern int PQntuples(const PGresult *res);
|
extern int PQntuples(const PGresult *res);
|
||||||
extern int PQnfields(const PGresult *res);
|
extern int PQnfields(const PGresult *res);
|
||||||
extern int PQbinaryTuples(const PGresult *res);
|
extern int PQbinaryTuples(const PGresult *res);
|
||||||
extern char *PQfname(const PGresult *res, int field_num);
|
extern char *PQfname(const PGresult *res, int field_num);
|
||||||
extern int PQfnumber(const PGresult *res, const char *field_name);
|
extern int PQfnumber(const PGresult *res, const char *field_name);
|
||||||
extern Oid PQftype(const PGresult *res, int field_num);
|
extern Oid PQftype(const PGresult *res, int field_num);
|
||||||
extern int PQfsize(const PGresult *res, int field_num);
|
extern int PQfsize(const PGresult *res, int field_num);
|
||||||
extern int PQfmod(const PGresult *res, int field_num);
|
extern int PQfmod(const PGresult *res, int field_num);
|
||||||
extern char *PQcmdStatus(PGresult *res);
|
extern char *PQcmdStatus(PGresult *res);
|
||||||
extern char *PQoidStatus(const PGresult *res); /* old and ugly */
|
extern char *PQoidStatus(const PGresult *res); /* old and ugly */
|
||||||
extern Oid PQoidValue(const PGresult *res); /* new and improved */
|
extern Oid PQoidValue(const PGresult *res); /* new and improved */
|
||||||
extern char *PQcmdTuples(PGresult *res);
|
extern char *PQcmdTuples(PGresult *res);
|
||||||
extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
|
extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
|
||||||
extern int PQgetlength(const PGresult *res, int tup_num, int field_num);
|
extern int PQgetlength(const PGresult *res, int tup_num, int field_num);
|
||||||
extern int PQgetisnull(const PGresult *res, int tup_num, int field_num);
|
extern int PQgetisnull(const PGresult *res, int tup_num, int field_num);
|
||||||
|
|
||||||
/* Delete a PGresult */
|
/* Delete a PGresult */
|
||||||
extern void PQclear(PGresult *res);
|
extern void PQclear(PGresult *res);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make an empty PGresult with given status (some apps find this
|
* Make an empty PGresult with given status (some apps find this
|
||||||
* useful). If conn is not NULL and status indicates an error, the
|
* useful). If conn is not NULL and status indicates an error, the
|
||||||
* conn's errorMessage is copied.
|
* conn's errorMessage is copied.
|
||||||
*/
|
*/
|
||||||
extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status);
|
extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status);
|
||||||
|
|
||||||
/* === in fe-print.c === */
|
/* === in fe-print.c === */
|
||||||
|
|
||||||
extern void PQprint(FILE *fout, /* output stream */
|
extern void
|
||||||
|
PQprint(FILE *fout, /* output stream */
|
||||||
const PGresult *res,
|
const PGresult *res,
|
||||||
const PQprintOpt *ps); /* option structure */
|
const PQprintOpt *ps); /* option structure */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* really old printing routines
|
* really old printing routines
|
||||||
*/
|
*/
|
||||||
extern void PQdisplayTuples(const PGresult *res,
|
extern void
|
||||||
FILE *fp, /* where to send the
|
PQdisplayTuples(const PGresult *res,
|
||||||
* output */
|
FILE *fp, /* where to send the output */
|
||||||
int fillAlign, /* pad the fields with
|
int fillAlign, /* pad the fields with spaces */
|
||||||
* spaces */
|
|
||||||
const char *fieldSep, /* field separator */
|
const char *fieldSep, /* field separator */
|
||||||
int printHeader, /* display headers? */
|
int printHeader, /* display headers? */
|
||||||
int quiet);
|
int quiet);
|
||||||
|
|
||||||
extern void PQprintTuples(const PGresult *res,
|
extern void
|
||||||
|
PQprintTuples(const PGresult *res,
|
||||||
FILE *fout, /* output stream */
|
FILE *fout, /* output stream */
|
||||||
int printAttName, /* print attribute names */
|
int printAttName, /* print attribute names */
|
||||||
int terseOutput, /* delimiter bars */
|
int terseOutput, /* delimiter bars */
|
||||||
int width); /* width of column, if
|
int width); /* width of column, if 0, use variable
|
||||||
* 0, use variable width */
|
* width */
|
||||||
|
|
||||||
|
|
||||||
/* === in fe-lobj.c === */
|
/* === in fe-lobj.c === */
|
||||||
|
|
||||||
/* Large-object access routines */
|
/* Large-object access routines */
|
||||||
extern int lo_open(PGconn *conn, Oid lobjId, int mode);
|
extern int lo_open(PGconn *conn, Oid lobjId, int mode);
|
||||||
extern int lo_close(PGconn *conn, int fd);
|
extern int lo_close(PGconn *conn, int fd);
|
||||||
extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
|
extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
|
||||||
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
|
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
|
||||||
extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
|
extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
|
||||||
extern Oid lo_creat(PGconn *conn, int mode);
|
extern Oid lo_creat(PGconn *conn, int mode);
|
||||||
extern int lo_tell(PGconn *conn, int fd);
|
extern int lo_tell(PGconn *conn, int fd);
|
||||||
extern int lo_unlink(PGconn *conn, Oid lobjId);
|
extern int lo_unlink(PGconn *conn, Oid lobjId);
|
||||||
extern Oid lo_import(PGconn *conn, const char *filename);
|
extern Oid lo_import(PGconn *conn, const char *filename);
|
||||||
extern int lo_export(PGconn *conn, Oid lobjId, const char *filename);
|
extern int lo_export(PGconn *conn, Oid lobjId, const char *filename);
|
||||||
|
|
||||||
/* === in fe-misc.c === */
|
/* === in fe-misc.c === */
|
||||||
|
|
||||||
/* Determine length of multibyte encoded char at *s */
|
/* Determine length of multibyte encoded char at *s */
|
||||||
extern int PQmblen(const unsigned char *s, int encoding);
|
extern int PQmblen(const unsigned char *s, int encoding);
|
||||||
|
|
||||||
/* Get encoding id from environment variable PGCLIENTENCODING */
|
/* Get encoding id from environment variable PGCLIENTENCODING */
|
||||||
extern int PQenv2encoding(void);
|
extern int PQenv2encoding(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
GetPrivateProfileString(const char *theSection, /* section name */
|
GetPrivateProfileString(const char *theSection, /* section name */
|
||||||
const char *theKey, /* search key name */
|
const char *theKey, /* search key name */
|
||||||
const char *theDefault, /* default value if not
|
const char *theDefault, /* default value if not
|
||||||
* found */
|
* found */
|
||||||
|
@ -30,8 +30,8 @@ extern "C"
|
||||||
const char *theIniFileName); /* pathname of ini file
|
const char *theIniFileName); /* pathname of ini file
|
||||||
* to search */
|
* to search */
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
WritePrivateProfileString(const char *theSection, /* section name */
|
WritePrivateProfileString(const char *theSection, /* section name */
|
||||||
const char *theKey, /* write key name */
|
const char *theKey, /* write key name */
|
||||||
const char *theBuffer, /* input buffer */
|
const char *theBuffer, /* input buffer */
|
||||||
const char *theIniFileName); /* pathname of ini file
|
const char *theIniFileName); /* pathname of ini file
|
||||||
|
|
|
@ -135,21 +135,21 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RETCODE SQL_API SQLAllocConnect(HENV henv,
|
RETCODE SQL_API SQLAllocConnect(HENV henv,
|
||||||
HDBC FAR * phdbc);
|
HDBC FAR * phdbc);
|
||||||
RETCODE SQL_API SQLAllocEnv(HENV FAR * phenv);
|
RETCODE SQL_API SQLAllocEnv(HENV FAR * phenv);
|
||||||
RETCODE SQL_API SQLAllocStmt(HDBC hdbc,
|
RETCODE SQL_API SQLAllocStmt(HDBC hdbc,
|
||||||
HSTMT FAR * phstmt);
|
HSTMT FAR * phstmt);
|
||||||
RETCODE SQL_API SQLBindCol(HSTMT hstmt,
|
RETCODE SQL_API SQLBindCol(HSTMT hstmt,
|
||||||
UWORD icol,
|
UWORD icol,
|
||||||
SWORD fCType,
|
SWORD fCType,
|
||||||
PTR rgbValue,
|
PTR rgbValue,
|
||||||
SDWORD cbValueMax,
|
SDWORD cbValueMax,
|
||||||
SDWORD FAR * pcbValue);
|
SDWORD FAR * pcbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLCancel(HSTMT hstmt);
|
RETCODE SQL_API SQLCancel(HSTMT hstmt);
|
||||||
|
|
||||||
RETCODE SQL_API SQLColAttributes(HSTMT hstmt,
|
RETCODE SQL_API SQLColAttributes(HSTMT hstmt,
|
||||||
UWORD icol,
|
UWORD icol,
|
||||||
UWORD fDescType,
|
UWORD fDescType,
|
||||||
PTR rgbDesc,
|
PTR rgbDesc,
|
||||||
|
@ -157,7 +157,7 @@ extern "C"
|
||||||
SWORD FAR * pcbDesc,
|
SWORD FAR * pcbDesc,
|
||||||
SDWORD FAR * pfDesc);
|
SDWORD FAR * pfDesc);
|
||||||
|
|
||||||
RETCODE SQL_API SQLConnect(HDBC hdbc,
|
RETCODE SQL_API SQLConnect(HDBC hdbc,
|
||||||
UCHAR FAR * szDSN,
|
UCHAR FAR * szDSN,
|
||||||
SWORD cbDSN,
|
SWORD cbDSN,
|
||||||
UCHAR FAR * szUID,
|
UCHAR FAR * szUID,
|
||||||
|
@ -165,7 +165,7 @@ extern "C"
|
||||||
UCHAR FAR * szAuthStr,
|
UCHAR FAR * szAuthStr,
|
||||||
SWORD cbAuthStr);
|
SWORD cbAuthStr);
|
||||||
|
|
||||||
RETCODE SQL_API SQLDescribeCol(HSTMT hstmt,
|
RETCODE SQL_API SQLDescribeCol(HSTMT hstmt,
|
||||||
UWORD icol,
|
UWORD icol,
|
||||||
UCHAR FAR * szColName,
|
UCHAR FAR * szColName,
|
||||||
SWORD cbColNameMax,
|
SWORD cbColNameMax,
|
||||||
|
@ -175,9 +175,9 @@ extern "C"
|
||||||
SWORD FAR * pibScale,
|
SWORD FAR * pibScale,
|
||||||
SWORD FAR * pfNullable);
|
SWORD FAR * pfNullable);
|
||||||
|
|
||||||
RETCODE SQL_API SQLDisconnect(HDBC hdbc);
|
RETCODE SQL_API SQLDisconnect(HDBC hdbc);
|
||||||
|
|
||||||
RETCODE SQL_API SQLError(HENV henv,
|
RETCODE SQL_API SQLError(HENV henv,
|
||||||
HDBC hdbc,
|
HDBC hdbc,
|
||||||
HSTMT hstmt,
|
HSTMT hstmt,
|
||||||
UCHAR FAR * szSqlState,
|
UCHAR FAR * szSqlState,
|
||||||
|
@ -186,45 +186,45 @@ extern "C"
|
||||||
SWORD cbErrorMsgMax,
|
SWORD cbErrorMsgMax,
|
||||||
SWORD FAR * pcbErrorMsg);
|
SWORD FAR * pcbErrorMsg);
|
||||||
|
|
||||||
RETCODE SQL_API SQLExecDirect(HSTMT hstmt,
|
RETCODE SQL_API SQLExecDirect(HSTMT hstmt,
|
||||||
UCHAR FAR * szSqlStr,
|
UCHAR FAR * szSqlStr,
|
||||||
SDWORD cbSqlStr);
|
SDWORD cbSqlStr);
|
||||||
|
|
||||||
RETCODE SQL_API SQLExecute(HSTMT hstmt);
|
RETCODE SQL_API SQLExecute(HSTMT hstmt);
|
||||||
|
|
||||||
RETCODE SQL_API SQLFetch(HSTMT hstmt);
|
RETCODE SQL_API SQLFetch(HSTMT hstmt);
|
||||||
|
|
||||||
RETCODE SQL_API SQLFreeConnect(HDBC hdbc);
|
RETCODE SQL_API SQLFreeConnect(HDBC hdbc);
|
||||||
|
|
||||||
RETCODE SQL_API SQLFreeEnv(HENV henv);
|
RETCODE SQL_API SQLFreeEnv(HENV henv);
|
||||||
|
|
||||||
RETCODE SQL_API SQLFreeStmt(HSTMT hstmt,
|
RETCODE SQL_API SQLFreeStmt(HSTMT hstmt,
|
||||||
UWORD fOption);
|
UWORD fOption);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetCursorName(HSTMT hstmt,
|
RETCODE SQL_API SQLGetCursorName(HSTMT hstmt,
|
||||||
UCHAR FAR * szCursor,
|
UCHAR FAR * szCursor,
|
||||||
SWORD cbCursorMax,
|
SWORD cbCursorMax,
|
||||||
SWORD FAR * pcbCursor);
|
SWORD FAR * pcbCursor);
|
||||||
|
|
||||||
RETCODE SQL_API SQLNumResultCols(HSTMT hstmt,
|
RETCODE SQL_API SQLNumResultCols(HSTMT hstmt,
|
||||||
SWORD FAR * pccol);
|
SWORD FAR * pccol);
|
||||||
|
|
||||||
RETCODE SQL_API SQLPrepare(HSTMT hstmt,
|
RETCODE SQL_API SQLPrepare(HSTMT hstmt,
|
||||||
UCHAR FAR * szSqlStr,
|
UCHAR FAR * szSqlStr,
|
||||||
SDWORD cbSqlStr);
|
SDWORD cbSqlStr);
|
||||||
|
|
||||||
RETCODE SQL_API SQLRowCount(HSTMT hstmt,
|
RETCODE SQL_API SQLRowCount(HSTMT hstmt,
|
||||||
SDWORD FAR * pcrow);
|
SDWORD FAR * pcrow);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetCursorName(HSTMT hstmt,
|
RETCODE SQL_API SQLSetCursorName(HSTMT hstmt,
|
||||||
UCHAR FAR * szCursor,
|
UCHAR FAR * szCursor,
|
||||||
SWORD cbCursor);
|
SWORD cbCursor);
|
||||||
|
|
||||||
RETCODE SQL_API SQLTransact(HENV henv,
|
RETCODE SQL_API SQLTransact(HENV henv,
|
||||||
HDBC hdbc,
|
HDBC hdbc,
|
||||||
UWORD fType);
|
UWORD fType);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetParam(HSTMT hstmt,
|
RETCODE SQL_API SQLSetParam(HSTMT hstmt,
|
||||||
UWORD ipar,
|
UWORD ipar,
|
||||||
SWORD fCType,
|
SWORD fCType,
|
||||||
SWORD fSqlType,
|
SWORD fSqlType,
|
||||||
|
@ -233,7 +233,7 @@ extern "C"
|
||||||
PTR rgbValue,
|
PTR rgbValue,
|
||||||
SDWORD FAR * pcbValue);
|
SDWORD FAR * pcbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLDataSources(HENV henv,
|
RETCODE SQL_API SQLDataSources(HENV henv,
|
||||||
UWORD Direction, UCHAR FAR * ServerName,
|
UWORD Direction, UCHAR FAR * ServerName,
|
||||||
WORD BufferLength1, WORD *NameLength1,
|
WORD BufferLength1, WORD *NameLength1,
|
||||||
UCHAR FAR * Description, WORD BufferLength2,
|
UCHAR FAR * Description, WORD BufferLength2,
|
||||||
|
|
|
@ -1342,13 +1342,13 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetConnectOption(HDBC, UWORD, UDWORD);
|
RETCODE SQL_API SQLSetConnectOption(HDBC, UWORD, UDWORD);
|
||||||
RETCODE SQL_API SQLNumResultCols(HSTMT, SWORD FAR *);
|
RETCODE SQL_API SQLNumResultCols(HSTMT, SWORD FAR *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* function prototypes previously missing from isqlext.h
|
* function prototypes previously missing from isqlext.h
|
||||||
*/
|
*/
|
||||||
RETCODE SQL_API SQLColumns(HSTMT hstmt,
|
RETCODE SQL_API SQLColumns(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1358,7 +1358,7 @@ extern "C"
|
||||||
UCHAR FAR * szColumnName,
|
UCHAR FAR * szColumnName,
|
||||||
SWORD cbColumnName);
|
SWORD cbColumnName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLDriverConnect(HDBC hdbc,
|
RETCODE SQL_API SQLDriverConnect(HDBC hdbc,
|
||||||
HWND hwnd,
|
HWND hwnd,
|
||||||
UCHAR FAR * szConnStrIn,
|
UCHAR FAR * szConnStrIn,
|
||||||
SWORD cbConnStrIn,
|
SWORD cbConnStrIn,
|
||||||
|
@ -1367,46 +1367,46 @@ extern "C"
|
||||||
SWORD FAR * pcbConnStrOut,
|
SWORD FAR * pcbConnStrOut,
|
||||||
UWORD fDriverCompletion);
|
UWORD fDriverCompletion);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetConnectOption(HDBC hdbc,
|
RETCODE SQL_API SQLGetConnectOption(HDBC hdbc,
|
||||||
UWORD fOption,
|
UWORD fOption,
|
||||||
PTR pvParam);
|
PTR pvParam);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetData(HSTMT hstmt,
|
RETCODE SQL_API SQLGetData(HSTMT hstmt,
|
||||||
UWORD icol,
|
UWORD icol,
|
||||||
SWORD fCType,
|
SWORD fCType,
|
||||||
PTR rgbValue,
|
PTR rgbValue,
|
||||||
SDWORD cbValueMax,
|
SDWORD cbValueMax,
|
||||||
SDWORD FAR * pcbValue);
|
SDWORD FAR * pcbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetFunctions(HDBC hdbc,
|
RETCODE SQL_API SQLGetFunctions(HDBC hdbc,
|
||||||
UWORD fFunction,
|
UWORD fFunction,
|
||||||
UWORD FAR * pfExists);
|
UWORD FAR * pfExists);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetInfo(HDBC hdbc,
|
RETCODE SQL_API SQLGetInfo(HDBC hdbc,
|
||||||
UWORD fInfoType,
|
UWORD fInfoType,
|
||||||
PTR rgbInfoValue,
|
PTR rgbInfoValue,
|
||||||
SWORD cbInfoValueMax,
|
SWORD cbInfoValueMax,
|
||||||
SWORD FAR * pcbInfoValue);
|
SWORD FAR * pcbInfoValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetStmtOption(HSTMT hstmt,
|
RETCODE SQL_API SQLGetStmtOption(HSTMT hstmt,
|
||||||
UWORD fOption,
|
UWORD fOption,
|
||||||
PTR pvParam);
|
PTR pvParam);
|
||||||
|
|
||||||
RETCODE SQL_API SQLGetTypeInfo(HSTMT hstmt,
|
RETCODE SQL_API SQLGetTypeInfo(HSTMT hstmt,
|
||||||
SWORD fSqlType);
|
SWORD fSqlType);
|
||||||
|
|
||||||
RETCODE SQL_API SQLParamData(HSTMT hstmt,
|
RETCODE SQL_API SQLParamData(HSTMT hstmt,
|
||||||
PTR FAR * prgbValue);
|
PTR FAR * prgbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLPutData(HSTMT hstmt,
|
RETCODE SQL_API SQLPutData(HSTMT hstmt,
|
||||||
PTR rgbValue,
|
PTR rgbValue,
|
||||||
SDWORD cbValue);
|
SDWORD cbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetStmtOption(HSTMT hstmt,
|
RETCODE SQL_API SQLSetStmtOption(HSTMT hstmt,
|
||||||
UWORD fOption,
|
UWORD fOption,
|
||||||
UDWORD vParam);
|
UDWORD vParam);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSpecialColumns(HSTMT hstmt,
|
RETCODE SQL_API SQLSpecialColumns(HSTMT hstmt,
|
||||||
UWORD fColType,
|
UWORD fColType,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
|
@ -1417,7 +1417,7 @@ extern "C"
|
||||||
UWORD fScope,
|
UWORD fScope,
|
||||||
UWORD fNullable);
|
UWORD fNullable);
|
||||||
|
|
||||||
RETCODE SQL_API SQLStatistics(HSTMT hstmt,
|
RETCODE SQL_API SQLStatistics(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1427,7 +1427,7 @@ extern "C"
|
||||||
UWORD fUnique,
|
UWORD fUnique,
|
||||||
UWORD fAccuracy);
|
UWORD fAccuracy);
|
||||||
|
|
||||||
RETCODE SQL_API SQLTables(HSTMT hstmt,
|
RETCODE SQL_API SQLTables(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1437,14 +1437,14 @@ extern "C"
|
||||||
UCHAR FAR * szTableType,
|
UCHAR FAR * szTableType,
|
||||||
SWORD cbTableType);
|
SWORD cbTableType);
|
||||||
|
|
||||||
RETCODE SQL_API SQLBrowseConnect(HDBC hdbc,
|
RETCODE SQL_API SQLBrowseConnect(HDBC hdbc,
|
||||||
UCHAR FAR * szConnStrIn,
|
UCHAR FAR * szConnStrIn,
|
||||||
SWORD cbConnStrIn,
|
SWORD cbConnStrIn,
|
||||||
UCHAR FAR * szConnStrOut,
|
UCHAR FAR * szConnStrOut,
|
||||||
SWORD cbConnStrOutMax,
|
SWORD cbConnStrOutMax,
|
||||||
SWORD FAR * pcbConnStrOut);
|
SWORD FAR * pcbConnStrOut);
|
||||||
|
|
||||||
RETCODE SQL_API SQLColumnPrivileges(HSTMT hstmt,
|
RETCODE SQL_API SQLColumnPrivileges(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1454,20 +1454,20 @@ extern "C"
|
||||||
UCHAR FAR * szColumnName,
|
UCHAR FAR * szColumnName,
|
||||||
SWORD cbColumnName);
|
SWORD cbColumnName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLDescribeParam(HSTMT hstmt,
|
RETCODE SQL_API SQLDescribeParam(HSTMT hstmt,
|
||||||
UWORD ipar,
|
UWORD ipar,
|
||||||
SWORD FAR * pfSqlType,
|
SWORD FAR * pfSqlType,
|
||||||
UDWORD FAR * pcbColDef,
|
UDWORD FAR * pcbColDef,
|
||||||
SWORD FAR * pibScale,
|
SWORD FAR * pibScale,
|
||||||
SWORD FAR * pfNullable);
|
SWORD FAR * pfNullable);
|
||||||
|
|
||||||
RETCODE SQL_API SQLExtendedFetch(HSTMT hstmt,
|
RETCODE SQL_API SQLExtendedFetch(HSTMT hstmt,
|
||||||
UWORD fFetchType,
|
UWORD fFetchType,
|
||||||
SDWORD irow,
|
SDWORD irow,
|
||||||
UDWORD FAR * pcrow,
|
UDWORD FAR * pcrow,
|
||||||
UWORD FAR * rgfRowStatus);
|
UWORD FAR * rgfRowStatus);
|
||||||
|
|
||||||
RETCODE SQL_API SQLForeignKeys(HSTMT hstmt,
|
RETCODE SQL_API SQLForeignKeys(HSTMT hstmt,
|
||||||
UCHAR FAR * szPkTableQualifier,
|
UCHAR FAR * szPkTableQualifier,
|
||||||
SWORD cbPkTableQualifier,
|
SWORD cbPkTableQualifier,
|
||||||
UCHAR FAR * szPkTableOwner,
|
UCHAR FAR * szPkTableOwner,
|
||||||
|
@ -1481,23 +1481,23 @@ extern "C"
|
||||||
UCHAR FAR * szFkTableName,
|
UCHAR FAR * szFkTableName,
|
||||||
SWORD cbFkTableName);
|
SWORD cbFkTableName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLMoreResults(HSTMT hstmt);
|
RETCODE SQL_API SQLMoreResults(HSTMT hstmt);
|
||||||
|
|
||||||
RETCODE SQL_API SQLNativeSql(HDBC hdbc,
|
RETCODE SQL_API SQLNativeSql(HDBC hdbc,
|
||||||
UCHAR FAR * szSqlStrIn,
|
UCHAR FAR * szSqlStrIn,
|
||||||
SDWORD cbSqlStrIn,
|
SDWORD cbSqlStrIn,
|
||||||
UCHAR FAR * szSqlStr,
|
UCHAR FAR * szSqlStr,
|
||||||
SDWORD cbSqlStrMax,
|
SDWORD cbSqlStrMax,
|
||||||
SDWORD FAR * pcbSqlStr);
|
SDWORD FAR * pcbSqlStr);
|
||||||
|
|
||||||
RETCODE SQL_API SQLNumParams(HSTMT hstmt,
|
RETCODE SQL_API SQLNumParams(HSTMT hstmt,
|
||||||
SWORD FAR * pcpar);
|
SWORD FAR * pcpar);
|
||||||
|
|
||||||
RETCODE SQL_API SQLParamOptions(HSTMT hstmt,
|
RETCODE SQL_API SQLParamOptions(HSTMT hstmt,
|
||||||
UDWORD crow,
|
UDWORD crow,
|
||||||
UDWORD FAR * pirow);
|
UDWORD FAR * pirow);
|
||||||
|
|
||||||
RETCODE SQL_API SQLPrimaryKeys(HSTMT hstmt,
|
RETCODE SQL_API SQLPrimaryKeys(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1505,7 +1505,7 @@ extern "C"
|
||||||
UCHAR FAR * szTableName,
|
UCHAR FAR * szTableName,
|
||||||
SWORD cbTableName);
|
SWORD cbTableName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLProcedureColumns(HSTMT hstmt,
|
RETCODE SQL_API SQLProcedureColumns(HSTMT hstmt,
|
||||||
UCHAR FAR * szProcQualifier,
|
UCHAR FAR * szProcQualifier,
|
||||||
SWORD cbProcQualifier,
|
SWORD cbProcQualifier,
|
||||||
UCHAR FAR * szProcOwner,
|
UCHAR FAR * szProcOwner,
|
||||||
|
@ -1515,7 +1515,7 @@ extern "C"
|
||||||
UCHAR FAR * szColumnName,
|
UCHAR FAR * szColumnName,
|
||||||
SWORD cbColumnName);
|
SWORD cbColumnName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLProcedures(HSTMT hstmt,
|
RETCODE SQL_API SQLProcedures(HSTMT hstmt,
|
||||||
UCHAR FAR * szProcQualifier,
|
UCHAR FAR * szProcQualifier,
|
||||||
SWORD cbProcQualifier,
|
SWORD cbProcQualifier,
|
||||||
UCHAR FAR * szProcOwner,
|
UCHAR FAR * szProcOwner,
|
||||||
|
@ -1523,12 +1523,12 @@ extern "C"
|
||||||
UCHAR FAR * szProcName,
|
UCHAR FAR * szProcName,
|
||||||
SWORD cbProcName);
|
SWORD cbProcName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetPos(HSTMT hstmt,
|
RETCODE SQL_API SQLSetPos(HSTMT hstmt,
|
||||||
UWORD irow,
|
UWORD irow,
|
||||||
UWORD fOption,
|
UWORD fOption,
|
||||||
UWORD fLock);
|
UWORD fLock);
|
||||||
|
|
||||||
RETCODE SQL_API SQLTablePrivileges(HSTMT hstmt,
|
RETCODE SQL_API SQLTablePrivileges(HSTMT hstmt,
|
||||||
UCHAR FAR * szTableQualifier,
|
UCHAR FAR * szTableQualifier,
|
||||||
SWORD cbTableQualifier,
|
SWORD cbTableQualifier,
|
||||||
UCHAR FAR * szTableOwner,
|
UCHAR FAR * szTableOwner,
|
||||||
|
@ -1536,7 +1536,7 @@ extern "C"
|
||||||
UCHAR FAR * szTableName,
|
UCHAR FAR * szTableName,
|
||||||
SWORD cbTableName);
|
SWORD cbTableName);
|
||||||
|
|
||||||
RETCODE SQL_API SQLBindParameter(HSTMT hstmt,
|
RETCODE SQL_API SQLBindParameter(HSTMT hstmt,
|
||||||
UWORD ipar,
|
UWORD ipar,
|
||||||
SWORD fParamType,
|
SWORD fParamType,
|
||||||
SWORD fCType,
|
SWORD fCType,
|
||||||
|
@ -1547,7 +1547,7 @@ extern "C"
|
||||||
SDWORD cbValueMax,
|
SDWORD cbValueMax,
|
||||||
SDWORD FAR * pcbValue);
|
SDWORD FAR * pcbValue);
|
||||||
|
|
||||||
RETCODE SQL_API SQLSetScrollOptions(HSTMT hstmt,
|
RETCODE SQL_API SQLSetScrollOptions(HSTMT hstmt,
|
||||||
UWORD fConcurrency,
|
UWORD fConcurrency,
|
||||||
SDWORD crowKeyset,
|
SDWORD crowKeyset,
|
||||||
UWORD crowRowset);
|
UWORD crowRowset);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.49 2001/11/05 19:41:56 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.50 2001/11/08 20:37:52 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
|
@ -419,6 +419,7 @@ plpgsql_exec_function(PLpgSQL_function * func, FunctionCallInfo fcinfo)
|
||||||
func->fn_rettypelem,
|
func->fn_rettypelem,
|
||||||
-1,
|
-1,
|
||||||
&fcinfo->isnull);
|
&fcinfo->isnull);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the functions return type isn't by value, copy the value
|
* If the functions return type isn't by value, copy the value
|
||||||
* into upper executor memory context.
|
* into upper executor memory context.
|
||||||
|
|
Loading…
Reference in New Issue