Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
77e4fd88
Commit
77e4fd88
authored
Nov 08, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indenting for 'extern "C"' cases.
parent
e8192dc0
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
737 additions
and
731 deletions
+737
-731
src/backend/port/darwin/system.c
src/backend/port/darwin/system.c
+50
-44
src/backend/port/dynloader/aix.h
src/backend/port/dynloader/aix.h
+14
-14
src/backend/port/qnx4/sem.h
src/backend/port/qnx4/sem.h
+17
-17
src/backend/port/qnx4/shm.h
src/backend/port/qnx4/shm.h
+11
-11
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/proc.c
+2
-2
src/backend/tioga/tgRecipe.h
src/backend/tioga/tgRecipe.h
+2
-1
src/include/executor/spi.h
src/include/executor/spi.h
+2
-2
src/include/port/darwin/sem.h
src/include/port/darwin/sem.h
+17
-17
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/include/ecpglib.h
+24
-25
src/interfaces/ecpg/include/ecpgtype.h
src/interfaces/ecpg/include/ecpgtype.h
+38
-39
src/interfaces/ecpg/include/sqlca.h
src/interfaces/ecpg/include/sqlca.h
+37
-37
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-misc.c
+2
-2
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-fe.h
+193
-193
src/interfaces/odbc/gpps.h
src/interfaces/odbc/gpps.h
+18
-18
src/interfaces/odbc/isql.h
src/interfaces/odbc/isql.h
+103
-103
src/interfaces/odbc/isqlext.h
src/interfaces/odbc/isqlext.h
+205
-205
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_exec.c
+2
-1
No files found.
src/backend/port/darwin/system.c
View file @
77e4fd88
...
...
@@ -6,22 +6,22 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*
notice, this list of conditions and the following disclaimer.
*
notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*
notice, this list of conditions and the following disclaimer in the
*
documentation and/or other materials provided with the distribution.
*
notice, this list of conditions and the following disclaimer in the
*
documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
*
must display the following acknowledgement:
*
must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
*
may be used to endorse or promote products derived from this software
*
without specific prior written permission.
*
may be used to endorse or promote products derived from this software
*
without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
...
...
@@ -35,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static
char
sccsid
[]
=
"@(#)system.c 8.1 (Berkeley) 6/4/93"
;
#endif
/* LIBC_SCCS and not lint */
#endif
/* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/wait.h>
...
...
@@ -46,51 +46,57 @@ static char sccsid[] = "@(#)system.c 8.1 (Berkeley) 6/4/93";
#include <paths.h>
#include <errno.h>
int
system
(
const
char
*
command
);
int
system
(
const
char
*
command
);
int
system
(
const
char
*
command
)
{
pid_t
pid
;
int
pstat
;
struct
sigaction
ign
,
intact
,
quitact
;
sigset_t
newsigblock
,
oldsigblock
;
pid_t
pid
;
int
pstat
;
struct
sigaction
ign
,
intact
,
quitact
;
sigset_t
newsigblock
,
oldsigblock
;
if
(
!
command
)
/* just checking... */
return
(
1
);
if
(
!
command
)
/* just checking... */
return
(
1
);
/*
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save
*
existing
signal dispositions.
* Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save
existing
* signal dispositions.
*/
ign
.
sa_handler
=
SIG_IGN
;
(
void
)
sigemptyset
(
&
ign
.
sa_mask
);
(
void
)
sigemptyset
(
&
ign
.
sa_mask
);
ign
.
sa_flags
=
0
;
(
void
)
sigaction
(
SIGINT
,
&
ign
,
&
intact
);
(
void
)
sigaction
(
SIGQUIT
,
&
ign
,
&
quitact
);
(
void
)
sigemptyset
(
&
newsigblock
);
(
void
)
sigaddset
(
&
newsigblock
,
SIGCHLD
);
(
void
)
sigprocmask
(
SIG_BLOCK
,
&
newsigblock
,
&
oldsigblock
);
switch
(
pid
=
fork
())
{
case
-
1
:
/* error */
break
;
case
0
:
/* child */
/*
* Restore original signal dispositions and exec the command.
*/
(
void
)
sigaction
(
SIGINT
,
&
intact
,
NULL
);
(
void
)
sigaction
(
SIGQUIT
,
&
quitact
,
NULL
);
(
void
)
sigprocmask
(
SIG_SETMASK
,
&
oldsigblock
,
NULL
);
execl
(
_PATH_BSHELL
,
"sh"
,
"-c"
,
command
,
(
char
*
)
NULL
);
_exit
(
127
);
default:
/* parent */
do
{
pid
=
wait4
(
pid
,
&
pstat
,
0
,
(
struct
rusage
*
)
0
);
}
while
(
pid
==
-
1
&&
errno
==
EINTR
);
break
;
(
void
)
sigaction
(
SIGINT
,
&
ign
,
&
intact
);
(
void
)
sigaction
(
SIGQUIT
,
&
ign
,
&
quitact
);
(
void
)
sigemptyset
(
&
newsigblock
);
(
void
)
sigaddset
(
&
newsigblock
,
SIGCHLD
);
(
void
)
sigprocmask
(
SIG_BLOCK
,
&
newsigblock
,
&
oldsigblock
);
switch
(
pid
=
fork
())
{
case
-
1
:
/* error */
break
;
case
0
:
/* child */
/*
* Restore original signal dispositions and exec the command.
*/
(
void
)
sigaction
(
SIGINT
,
&
intact
,
NULL
);
(
void
)
sigaction
(
SIGQUIT
,
&
quitact
,
NULL
);
(
void
)
sigprocmask
(
SIG_SETMASK
,
&
oldsigblock
,
NULL
);
execl
(
_PATH_BSHELL
,
"sh"
,
"-c"
,
command
,
(
char
*
)
NULL
);
_exit
(
127
);
default:
/* parent */
do
{
pid
=
wait4
(
pid
,
&
pstat
,
0
,
(
struct
rusage
*
)
0
);
}
while
(
pid
==
-
1
&&
errno
==
EINTR
);
break
;
}
(
void
)
sigaction
(
SIGINT
,
&
intact
,
NULL
);
(
void
)
sigaction
(
SIGQUIT
,
&
quitact
,
NULL
);
(
void
)
sigprocmask
(
SIG_SETMASK
,
&
oldsigblock
,
NULL
);
return
(
pid
==
-
1
?
-
1
:
pstat
);
(
void
)
sigaction
(
SIGINT
,
&
intact
,
NULL
);
(
void
)
sigaction
(
SIGQUIT
,
&
quitact
,
NULL
);
(
void
)
sigprocmask
(
SIG_SETMASK
,
&
oldsigblock
,
NULL
);
return
(
pid
==
-
1
?
-
1
:
pstat
);
}
src/backend/port/dynloader/aix.h
View file @
77e4fd88
/*
* $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
* 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
* that contains functions to be called to initialize and terminate.
*/
struct
dl_info
{
void
(
*
init
)
(
void
);
void
(
*
fini
)
(
void
);
};
struct
dl_info
{
void
(
*
init
)
(
void
);
void
(
*
fini
)
(
void
);
};
#if __STDC__ || defined(_IBMR2)
void
*
dlopen
(
const
char
*
path
,
int
mode
);
void
*
dlsym
(
void
*
handle
,
const
char
*
symbol
);
char
*
dlerror
(
void
);
int
dlclose
(
void
*
handle
);
void
*
dlopen
(
const
char
*
path
,
int
mode
);
void
*
dlsym
(
void
*
handle
,
const
char
*
symbol
);
char
*
dlerror
(
void
);
int
dlclose
(
void
*
handle
);
#else
void
*
dlopen
();
void
*
dlsym
();
char
*
dlerror
();
int
dlclose
();
void
*
dlopen
();
void
*
dlsym
();
char
*
dlerror
();
int
dlclose
();
#endif
#ifdef __cplusplus
...
...
src/backend/port/qnx4/sem.h
View file @
77e4fd88
...
...
@@ -7,7 +7,7 @@
*
*
* 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.
*/
struct
sem
{
ushort_t
semval
;
/* semaphore text map address */
pid_t
sempid
;
/* pid of last operation */
ushort_t
semncnt
;
/* # awaiting semval > cval */
ushort_t
semzcnt
;
/* # awaiting semval = 0 */
};
struct
sem
{
ushort_t
semval
;
/* semaphore text map address */
pid_t
sempid
;
/* pid of last operation */
ushort_t
semncnt
;
/* # awaiting semval > cval */
ushort_t
semzcnt
;
/* # awaiting semval = 0 */
};
/*
* User semaphore template for semop system calls.
*/
struct
sembuf
{
ushort_t
sem_num
;
/* semaphore # */
short
sem_op
;
/* semaphore operation */
short
sem_flg
;
/* operation flags */
};
struct
sembuf
{
ushort_t
sem_num
;
/* semaphore # */
short
sem_op
;
/* semaphore operation */
short
sem_flg
;
/* operation flags */
};
extern
int
semctl
(
int
semid
,
int
semnum
,
int
cmd
,
/* ... */
union
semun
arg
);
extern
int
semget
(
key_t
key
,
int
nsems
,
int
semflg
);
extern
int
semop
(
int
semid
,
struct
sembuf
*
sops
,
size_t
nsops
);
extern
int
semctl
(
int
semid
,
int
semnum
,
int
cmd
,
/* ... */
union
semun
arg
);
extern
int
semget
(
key_t
key
,
int
nsems
,
int
semflg
);
extern
int
semop
(
int
semid
,
struct
sembuf
*
sops
,
size_t
nsops
);
#ifdef __cplusplus
}
...
...
src/backend/port/qnx4/shm.h
View file @
77e4fd88
...
...
@@ -7,7 +7,7 @@
*
*
* 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_W 0200
/* write permission */
struct
shmid_ds
{
int
dummy
;
int
shm_nattch
;
};
extern
void
*
shmat
(
int
shmid
,
const
void
*
shmaddr
,
int
shmflg
);
extern
int
shmdt
(
const
void
*
addr
);
extern
int
shmctl
(
int
shmid
,
int
cmd
,
struct
shmid_ds
*
buf
);
extern
int
shmget
(
key_t
key
,
size_t
size
,
int
flags
);
struct
shmid_ds
{
int
dummy
;
int
shm_nattch
;
};
extern
void
*
shmat
(
int
shmid
,
const
void
*
shmaddr
,
int
shmflg
);
extern
int
shmdt
(
const
void
*
addr
);
extern
int
shmctl
(
int
shmid
,
int
cmd
,
struct
shmid_ds
*
buf
);
extern
int
shmget
(
key_t
key
,
size_t
size
,
int
flags
);
#ifdef __cplusplus
}
...
...
src/backend/storage/lmgr/proc.c
View file @
77e4fd88
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.11
5 2001/11/06 00:38:26 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.11
6 2001/11/08 20:37:52 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -125,7 +125,7 @@ InitProcGlobal(int maxBackends)
/*
* Compute size for ProcGlobal structure. Note we need one more sema
* besides those used for regular backends; this is accounted for in
* the PROC_SEM_MAP_ENTRIES macro.
(We do it that way so that other
* the PROC_SEM_MAP_ENTRIES macro.
(We do it that way so that other
* modules that use PROC_SEM_MAP_ENTRIES(maxBackends) to size data
* structures don't have to know about this explicitly.)
*/
...
...
src/backend/tioga/tgRecipe.h
View file @
77e4fd88
...
...
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: tgRecipe.h,v 1.2
1 2001/11/05 17:46:28
momjian Exp $
* $Id: tgRecipe.h,v 1.2
2 2001/11/08 20:37:52
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,6 +29,7 @@ typedef struct
y
;
}
Point
;
/* this should match whatever is in
*
*
*
* geo-decls.h */
...
...
src/include/executor/spi.h
View file @
77e4fd88
...
...
@@ -2,7 +2,7 @@
*
* spi.h
*
* $Id: spi.h,v 1.3
2 2001/11/05 19:41:56 tgl
Exp $
* $Id: spi.h,v 1.3
3 2001/11/08 20:37:52 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -90,7 +90,7 @@ extern int SPI_freeplan(void *plan);
extern
HeapTuple
SPI_copytuple
(
HeapTuple
tuple
);
extern
TupleDesc
SPI_copytupledesc
(
TupleDesc
tupdesc
);
extern
TupleTableSlot
*
SPI_copytupleintoslot
(
HeapTuple
tuple
,
TupleDesc
tupdesc
);
TupleDesc
tupdesc
);
extern
HeapTuple
SPI_modifytuple
(
Relation
rel
,
HeapTuple
tuple
,
int
natts
,
int
*
attnum
,
Datum
*
Values
,
char
*
Nulls
);
extern
int
SPI_fnumber
(
TupleDesc
tupdesc
,
char
*
fname
);
...
...
src/include/port/darwin/sem.h
View file @
77e4fd88
...
...
@@ -7,7 +7,7 @@
*
*
* 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.
*/
struct
sem
{
ushort_t
semval
;
/* semaphore text map address */
pid_t
sempid
;
/* pid of last operation */
ushort_t
semncnt
;
/* # awaiting semval > cval */
ushort_t
semzcnt
;
/* # awaiting semval = 0 */
};
struct
sem
{
ushort_t
semval
;
/* semaphore text map address */
pid_t
sempid
;
/* pid of last operation */
ushort_t
semncnt
;
/* # awaiting semval > cval */
ushort_t
semzcnt
;
/* # awaiting semval = 0 */
};
/*
* User semaphore template for semop system calls.
*/
struct
sembuf
{
ushort_t
sem_num
;
/* semaphore # */
short
sem_op
;
/* semaphore operation */
short
sem_flg
;
/* operation flags */
};
struct
sembuf
{
ushort_t
sem_num
;
/* semaphore # */
short
sem_op
;
/* semaphore operation */
short
sem_flg
;
/* operation flags */
};
extern
int
semctl
(
int
semid
,
int
semnum
,
int
cmd
,
/* ... */
union
semun
arg
);
extern
int
semget
(
key_t
key
,
int
nsems
,
int
semflg
);
extern
int
semop
(
int
semid
,
struct
sembuf
*
sops
,
size_t
nsops
);
extern
int
semctl
(
int
semid
,
int
semnum
,
int
cmd
,
/* ... */
union
semun
arg
);
extern
int
semget
(
key_t
key
,
int
nsems
,
int
semflg
);
extern
int
semop
(
int
semid
,
struct
sembuf
*
sops
,
size_t
nsops
);
#ifdef __cplusplus
}
...
...
src/interfaces/ecpg/include/ecpglib.h
View file @
77e4fd88
...
...
@@ -35,23 +35,23 @@ extern "C"
{
#endif
void
ECPGdebug
(
int
,
FILE
*
);
bool
ECPGstatus
(
int
,
const
char
*
);
bool
ECPGsetcommit
(
int
,
const
char
*
,
const
char
*
);
bool
ECPGsetconn
(
int
,
const
char
*
);
bool
ECPGconnect
(
int
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
int
);
bool
ECPGdo
(
int
,
const
char
*
,
char
*
,...);
bool
ECPGtrans
(
int
,
const
char
*
,
const
char
*
);
bool
ECPGdisconnect
(
int
,
const
char
*
);
bool
ECPGprepare
(
int
,
char
*
,
char
*
);
bool
ECPGdeallocate
(
int
,
char
*
);
bool
ECPGdeallocate_all
(
int
);
char
*
ECPGprepared_statement
(
char
*
);
void
ECPGlog
(
const
char
*
format
,...);
/* print an error message */
void
sqlprint
(
void
);
void
ECPGdebug
(
int
,
FILE
*
);
bool
ECPGstatus
(
int
,
const
char
*
);
bool
ECPGsetcommit
(
int
,
const
char
*
,
const
char
*
);
bool
ECPGsetconn
(
int
,
const
char
*
);
bool
ECPGconnect
(
int
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
int
);
bool
ECPGdo
(
int
,
const
char
*
,
char
*
,...);
bool
ECPGtrans
(
int
,
const
char
*
,
const
char
*
);
bool
ECPGdisconnect
(
int
,
const
char
*
);
bool
ECPGprepare
(
int
,
char
*
,
char
*
);
bool
ECPGdeallocate
(
int
,
char
*
);
bool
ECPGdeallocate_all
(
int
);
char
*
ECPGprepared_statement
(
char
*
);
void
ECPGlog
(
const
char
*
format
,...);
/* print an error message */
void
sqlprint
(
void
);
/* define this for simplicity as well as compatibility */
...
...
@@ -59,16 +59,15 @@ extern "C"
/* dynamic SQL */
bool
ECPGdo_descriptor
(
int
line
,
const
char
*
connection
,
const
char
*
descriptor
,
const
char
*
query
);
bool
ECPGdeallocate_desc
(
int
line
,
const
char
*
name
);
bool
ECPGallocate_desc
(
int
line
,
const
char
*
name
);
void
ECPGraise
(
int
line
,
int
code
,
const
char
*
str
);
bool
ECPGget_desc_header
(
int
,
char
*
,
int
*
);
bool
ECPGget_desc
(
int
,
char
*
,
int
,...);
bool
ECPGdo_descriptor
(
int
line
,
const
char
*
connection
,
const
char
*
descriptor
,
const
char
*
query
);
bool
ECPGdeallocate_desc
(
int
line
,
const
char
*
name
);
bool
ECPGallocate_desc
(
int
line
,
const
char
*
name
);
void
ECPGraise
(
int
line
,
int
code
,
const
char
*
str
);
bool
ECPGget_desc_header
(
int
,
char
*
,
int
*
);
bool
ECPGget_desc
(
int
,
char
*
,
int
,...);
#ifdef __cplusplus
}
#endif
src/interfaces/ecpg/include/ecpgtype.h
View file @
77e4fd88
...
...
@@ -32,49 +32,48 @@ extern "C"
{
#endif
enum
ECPGttype
{
ECPGt_char
=
1
,
ECPGt_unsigned_char
,
ECPGt_short
,
ECPGt_unsigned_short
,
ECPGt_int
,
ECPGt_unsigned_int
,
ECPGt_long
,
ECPGt_unsigned_long
,
ECPGt_bool
,
ECPGt_float
,
ECPGt_double
,
ECPGt_varchar
,
ECPGt_varchar2
,
ECPGt_array
,
ECPGt_struct
,
ECPGt_union
,
ECPGt_char_variable
,
ECPGt_EOIT
,
/* End of insert types. */
ECPGt_EORT
,
/* End of result types. */
ECPGt_NO_INDICATOR
,
/* no indicator */
ECPGt_long_long
,
ECPGt_unsigned_long_long
,
ECPGt_descriptor
/* sql descriptor, no C variable */
};
enum
ECPGttype
{
ECPGt_char
=
1
,
ECPGt_unsigned_char
,
ECPGt_short
,
ECPGt_unsigned_short
,
ECPGt_int
,
ECPGt_unsigned_int
,
ECPGt_long
,
ECPGt_unsigned_long
,
ECPGt_bool
,
ECPGt_float
,
ECPGt_double
,
ECPGt_varchar
,
ECPGt_varchar2
,
ECPGt_array
,
ECPGt_struct
,
ECPGt_union
,
ECPGt_char_variable
,
ECPGt_EOIT
,
/* End of insert types. */
ECPGt_EORT
,
/* End of result types. */
ECPGt_NO_INDICATOR
,
/* no indicator */
ECPGt_long_long
,
ECPGt_unsigned_long_long
,
ECPGt_descriptor
/* sql descriptor, no C variable */
};
/* descriptor items */
enum
ECPGdtype
{
ECPGd_count
=
1
,
ECPGd_data
,
ECPGd_di_code
,
ECPGd_di_precision
,
ECPGd_indicator
,
ECPGd_key_member
,
ECPGd_length
,
ECPGd_name
,
ECPGd_nullable
,
ECPGd_octet
,
ECPGd_precision
,
ECPGd_ret_length
,
ECPGd_ret_octet
,
ECPGd_scale
,
ECPGd_type
,
ECPGd_EODT
,
/* End of descriptor types. */
ECPGd_cardinality
};
/* descriptor items */
enum
ECPGdtype
{
ECPGd_count
=
1
,
ECPGd_data
,
ECPGd_di_code
,
ECPGd_di_precision
,
ECPGd_indicator
,
ECPGd_key_member
,
ECPGd_length
,
ECPGd_name
,
ECPGd_nullable
,
ECPGd_octet
,
ECPGd_precision
,
ECPGd_ret_length
,
ECPGd_ret_octet
,
ECPGd_scale
,
ECPGd_type
,
ECPGd_EODT
,
/* End of descriptor types. */
ECPGd_cardinality
};
#define IS_SIMPLE_TYPE(type) (((type) >= ECPGt_char && (type) <= ECPGt_varchar2) || ((type)>=ECPGt_long_long && (type) <= ECPGt_unsigned_long_long))
#ifdef __cplusplus
}
#endif
src/interfaces/ecpg/include/sqlca.h
View file @
77e4fd88
...
...
@@ -16,44 +16,44 @@ extern "C"
{
#endif
struct
sqlca
struct
sqlca
{
char
sqlcaid
[
8
];
long
sqlabc
;
long
sqlcode
;
struct
{
char
sqlcaid
[
8
];
long
sqlabc
;
long
sqlcode
;
struct
{
int
sqlerrml
;
char
sqlerrmc
[
SQLERRMC_LEN
];
}
sqlerrm
;
char
sqlerrp
[
8
];
long
sqlerrd
[
6
];
/* Element 0: empty */
/* 1: OID of processed tuple if applicable */
/* 2: number of rows processed */
/* after an INSERT, UPDATE or */
/* DELETE statement */
/* 3: empty */
/* 4: empty */
/* 5: empty */
char
sqlwarn
[
8
];
/* Element 0: set to 'W' if at least one other is 'W' */
/* 1: if 'W' at least one character string */
/* value was truncated when it was */
/* stored into a host variable. */
/*
* 2: if 'W' a (hopefully) non-fatal notice occured
*/
/* 3: empty */
/* 4: empty */
/* 5: empty */
/* 6: empty */
/* 7: empty */
char
sqlext
[
8
];
};
extern
DLLIMPORT
struct
sqlca
sqlca
;
int
sqlerrml
;
char
sqlerrmc
[
SQLERRMC_LEN
];
}
sqlerrm
;
char
sqlerrp
[
8
];
long
sqlerrd
[
6
];
/* Element 0: empty */
/* 1: OID of processed tuple if applicable */
/* 2: number of rows processed */
/* after an INSERT, UPDATE or */
/* DELETE statement */
/* 3: empty */
/* 4: empty */
/* 5: empty */
char
sqlwarn
[
8
];
/* Element 0: set to 'W' if at least one other is 'W' */
/* 1: if 'W' at least one character string */
/* value was truncated when it was */
/* stored into a host variable. */
/*
* 2: if 'W' a (hopefully) non-fatal notice occured
*/
/* 3: empty */
/* 4: empty */
/* 5: empty */
/* 6: empty */
/* 7: empty */
char
sqlext
[
8
];
};
extern
DLLIMPORT
struct
sqlca
sqlca
;
#ifdef __cplusplus
...
...
src/interfaces/libpq/fe-misc.c
View file @
77e4fd88
...
...
@@ -25,7 +25,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.6
1 2001/11/08 04:05:13 tgl
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.6
2 2001/11/08 20:37:52 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -128,7 +128,7 @@ pqPutBytes(const char *s, size_t nbytes, PGconn *conn)
{
printfPQExpBuffer
(
&
conn
->
errorMessage
,
libpq_gettext
(
"could not flush enough data (space available: %d, space needed %d)
\n
"
),
(
int
)
Max
(
conn
->
outBufSize
-
conn
->
outCount
,
0
),
(
int
)
Max
(
conn
->
outBufSize
-
conn
->
outCount
,
0
),
(
int
)
nbytes
);
return
EOF
;
}
...
...
src/interfaces/libpq/libpq-fe.h
View file @
77e4fd88
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/gpps.h
View file @
77e4fd88
...
...
@@ -18,24 +18,24 @@ extern "C"
{
#endif
DWORD
GetPrivateProfileString
(
const
char
*
theSection
,
/* section name */
const
char
*
theKey
,
/* search key name */
const
char
*
theDefault
,
/* default value if not
* found */
char
*
theReturnBuffer
,
/* return valuse stored
* here */
size_t
theBufferLength
,
/* byte length of return
* buffer */
const
char
*
theIniFileName
);
/* pathname of ini file
* to search */
DWORD
WritePrivateProfileString
(
const
char
*
theSection
,
/* section name */
const
char
*
theKey
,
/* write key name */
const
char
*
theBuffer
,
/* input buffer */
const
char
*
theIniFileName
);
/* pathname of ini file
* to write */
DWORD
GetPrivateProfileString
(
const
char
*
theSection
,
/* section name */
const
char
*
theKey
,
/* search key name */
const
char
*
theDefault
,
/* default value if not
* found */
char
*
theReturnBuffer
,
/* return valuse stored
* here */
size_t
theBufferLength
,
/* byte length of return
* buffer */
const
char
*
theIniFileName
);
/* pathname of ini file
* to search */
DWORD
WritePrivateProfileString
(
const
char
*
theSection
,
/* section name */
const
char
*
theKey
,
/* write key name */
const
char
*
theBuffer
,
/* input buffer */
const
char
*
theIniFileName
);
/* pathname of ini file
* to write */
#ifdef __cplusplus
}
...
...
src/interfaces/odbc/isql.h
View file @
77e4fd88
...
...
@@ -135,109 +135,109 @@ extern "C"
{
#endif
RETCODE
SQL_API
SQLAllocConnect
(
HENV
henv
,
HDBC
FAR
*
phdbc
);
RETCODE
SQL_API
SQLAllocEnv
(
HENV
FAR
*
phenv
);
RETCODE
SQL_API
SQLAllocStmt
(
HDBC
hdbc
,
HSTMT
FAR
*
phstmt
);
RETCODE
SQL_API
SQLBindCol
(
HSTMT
hstmt
,
UWORD
icol
,
SWORD
fCType
,
PTR
rgbValue
,
SDWORD
cbValueMax
,
SDWORD
FAR
*
pcbValue
);
RETCODE
SQL_API
SQLCancel
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLColAttributes
(
HSTMT
hstmt
,
UWORD
icol
,
UWORD
fDescType
,
PTR
rgbDesc
,
SWORD
cbDescMax
,
SWORD
FAR
*
pcbDesc
,
SDWORD
FAR
*
pfDesc
);
RETCODE
SQL_API
SQLConnect
(
HDBC
hdbc
,
UCHAR
FAR
*
szDSN
,
SWORD
cbDSN
,
UCHAR
FAR
*
szUID
,
SWORD
cbUID
,
UCHAR
FAR
*
szAuthStr
,
SWORD
cbAuthStr
);
RETCODE
SQL_API
SQLDescribeCol
(
HSTMT
hstmt
,
UWORD
icol
,
UCHAR
FAR
*
szColName
,
SWORD
cbColNameMax
,
SWORD
FAR
*
pcbColName
,
SWORD
FAR
*
pfSqlType
,
UDWORD
FAR
*
pcbColDef
,
SWORD
FAR
*
pibScale
,
SWORD
FAR
*
pfNullable
);
RETCODE
SQL_API
SQLDisconnect
(
HDBC
hdbc
);
RETCODE
SQL_API
SQLError
(
HENV
henv
,
HDBC
hdbc
,
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlState
,
SDWORD
FAR
*
pfNativeError
,
UCHAR
FAR
*
szErrorMsg
,
SWORD
cbErrorMsgMax
,
SWORD
FAR
*
pcbErrorMsg
);
RETCODE
SQL_API
SQLExecDirect
(
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlStr
,
SDWORD
cbSqlStr
);
RETCODE
SQL_API
SQLExecute
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLFetch
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLFreeConnect
(
HDBC
hdbc
);
RETCODE
SQL_API
SQLFreeEnv
(
HENV
henv
);
RETCODE
SQL_API
SQLFreeStmt
(
HSTMT
hstmt
,
UWORD
fOption
);
RETCODE
SQL_API
SQLGetCursorName
(
HSTMT
hstmt
,
UCHAR
FAR
*
szCursor
,
SWORD
cbCursorMax
,
SWORD
FAR
*
pcbCursor
);
RETCODE
SQL_API
SQLNumResultCols
(
HSTMT
hstmt
,
SWORD
FAR
*
pccol
);
RETCODE
SQL_API
SQLPrepare
(
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlStr
,
SDWORD
cbSqlStr
);
RETCODE
SQL_API
SQLRowCount
(
HSTMT
hstmt
,
SDWORD
FAR
*
pcrow
);
RETCODE
SQL_API
SQLSetCursorName
(
HSTMT
hstmt
,
UCHAR
FAR
*
szCursor
,
SWORD
cbCursor
);
RETCODE
SQL_API
SQLTransact
(
HENV
henv
,
HDBC
hdbc
,
UWORD
fType
);
RETCODE
SQL_API
SQLSetParam
(
HSTMT
hstmt
,
UWORD
ipar
,
SWORD
fCType
,
SWORD
fSqlType
,
UDWORD
cbColDef
,
SWORD
ibScale
,
PTR
rgbValue
,
SDWORD
FAR
*
pcbValue
);
RETCODE
SQL_API
SQLDataSources
(
HENV
henv
,
UWORD
Direction
,
UCHAR
FAR
*
ServerName
,
WORD
BufferLength1
,
WORD
*
NameLength1
,
UCHAR
FAR
*
Description
,
WORD
BufferLength2
,
WORD
*
NameLength2
);
RETCODE
SQL_API
SQLAllocConnect
(
HENV
henv
,
HDBC
FAR
*
phdbc
);
RETCODE
SQL_API
SQLAllocEnv
(
HENV
FAR
*
phenv
);
RETCODE
SQL_API
SQLAllocStmt
(
HDBC
hdbc
,
HSTMT
FAR
*
phstmt
);
RETCODE
SQL_API
SQLBindCol
(
HSTMT
hstmt
,
UWORD
icol
,
SWORD
fCType
,
PTR
rgbValue
,
SDWORD
cbValueMax
,
SDWORD
FAR
*
pcbValue
);
RETCODE
SQL_API
SQLCancel
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLColAttributes
(
HSTMT
hstmt
,
UWORD
icol
,
UWORD
fDescType
,
PTR
rgbDesc
,
SWORD
cbDescMax
,
SWORD
FAR
*
pcbDesc
,
SDWORD
FAR
*
pfDesc
);
RETCODE
SQL_API
SQLConnect
(
HDBC
hdbc
,
UCHAR
FAR
*
szDSN
,
SWORD
cbDSN
,
UCHAR
FAR
*
szUID
,
SWORD
cbUID
,
UCHAR
FAR
*
szAuthStr
,
SWORD
cbAuthStr
);
RETCODE
SQL_API
SQLDescribeCol
(
HSTMT
hstmt
,
UWORD
icol
,
UCHAR
FAR
*
szColName
,
SWORD
cbColNameMax
,
SWORD
FAR
*
pcbColName
,
SWORD
FAR
*
pfSqlType
,
UDWORD
FAR
*
pcbColDef
,
SWORD
FAR
*
pibScale
,
SWORD
FAR
*
pfNullable
);
RETCODE
SQL_API
SQLDisconnect
(
HDBC
hdbc
);
RETCODE
SQL_API
SQLError
(
HENV
henv
,
HDBC
hdbc
,
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlState
,
SDWORD
FAR
*
pfNativeError
,
UCHAR
FAR
*
szErrorMsg
,
SWORD
cbErrorMsgMax
,
SWORD
FAR
*
pcbErrorMsg
);
RETCODE
SQL_API
SQLExecDirect
(
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlStr
,
SDWORD
cbSqlStr
);
RETCODE
SQL_API
SQLExecute
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLFetch
(
HSTMT
hstmt
);
RETCODE
SQL_API
SQLFreeConnect
(
HDBC
hdbc
);
RETCODE
SQL_API
SQLFreeEnv
(
HENV
henv
);
RETCODE
SQL_API
SQLFreeStmt
(
HSTMT
hstmt
,
UWORD
fOption
);
RETCODE
SQL_API
SQLGetCursorName
(
HSTMT
hstmt
,
UCHAR
FAR
*
szCursor
,
SWORD
cbCursorMax
,
SWORD
FAR
*
pcbCursor
);
RETCODE
SQL_API
SQLNumResultCols
(
HSTMT
hstmt
,
SWORD
FAR
*
pccol
);
RETCODE
SQL_API
SQLPrepare
(
HSTMT
hstmt
,
UCHAR
FAR
*
szSqlStr
,
SDWORD
cbSqlStr
);
RETCODE
SQL_API
SQLRowCount
(
HSTMT
hstmt
,
SDWORD
FAR
*
pcrow
);
RETCODE
SQL_API
SQLSetCursorName
(
HSTMT
hstmt
,
UCHAR
FAR
*
szCursor
,
SWORD
cbCursor
);
RETCODE
SQL_API
SQLTransact
(
HENV
henv
,
HDBC
hdbc
,
UWORD
fType
);
RETCODE
SQL_API
SQLSetParam
(
HSTMT
hstmt
,
UWORD
ipar
,
SWORD
fCType
,
SWORD
fSqlType
,
UDWORD
cbColDef
,
SWORD
ibScale
,
PTR
rgbValue
,
SDWORD
FAR
*
pcbValue
);
RETCODE
SQL_API
SQLDataSources
(
HENV
henv
,
UWORD
Direction
,
UCHAR
FAR
*
ServerName
,
WORD
BufferLength1
,
WORD
*
NameLength1
,
UCHAR
FAR
*
Description
,
WORD
BufferLength2
,
WORD
*
NameLength2
);
#ifdef __cplusplus
}
...
...
src/interfaces/odbc/isqlext.h
View file @
77e4fd88
This diff is collapsed.
Click to expand it.
src/pl/plpgsql/src/pl_exec.c
View file @
77e4fd88
...
...
@@ -3,7 +3,7 @@
* procedural language
*
* 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.
*
...
...
@@ -419,6 +419,7 @@ plpgsql_exec_function(PLpgSQL_function * func, FunctionCallInfo fcinfo)
func
->
fn_rettypelem
,
-
1
,
&
fcinfo
->
isnull
);
/*
* If the functions return type isn't by value, copy the value
* into upper executor memory context.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment