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
9c891acd
Commit
9c891acd
authored
Feb 11, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include file alignment fixes.
parent
cc818a83
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
537 additions
and
536 deletions
+537
-536
src/interfaces/odbc/columninfo.h
src/interfaces/odbc/columninfo.h
+2
-2
src/interfaces/odbc/connection.h
src/interfaces/odbc/connection.h
+29
-29
src/interfaces/odbc/dlg_specific.h
src/interfaces/odbc/dlg_specific.h
+30
-29
src/interfaces/odbc/gpps.h
src/interfaces/odbc/gpps.h
+16
-16
src/interfaces/odbc/iodbc.h
src/interfaces/odbc/iodbc.h
+2
-2
src/interfaces/odbc/isql.h
src/interfaces/odbc/isql.h
+53
-54
src/interfaces/odbc/isqlext.h
src/interfaces/odbc/isqlext.h
+319
-319
src/interfaces/odbc/misc.h
src/interfaces/odbc/misc.h
+8
-8
src/interfaces/odbc/pgtypes.h
src/interfaces/odbc/pgtypes.h
+7
-7
src/interfaces/odbc/psqlodbc.h
src/interfaces/odbc/psqlodbc.h
+31
-30
src/interfaces/odbc/socket.h
src/interfaces/odbc/socket.h
+10
-10
src/interfaces/odbc/statement.h
src/interfaces/odbc/statement.h
+30
-30
No files found.
src/interfaces/odbc/columninfo.h
View file @
9c891acd
...
@@ -36,9 +36,9 @@ char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn);
...
@@ -36,9 +36,9 @@ char CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn);
/* functions for setting up the fields from within the program, */
/* functions for setting up the fields from within the program, */
/* without reading from a socket */
/* without reading from a socket */
void
CI_set_num_fields
(
ColumnInfoClass
*
self
,
int
new_num_fields
);
void
CI_set_num_fields
(
ColumnInfoClass
*
self
,
int
new_num_fields
);
void
CI_set_field_info
(
ColumnInfoClass
*
self
,
int
field_num
,
char
*
new_name
,
void
CI_set_field_info
(
ColumnInfoClass
*
self
,
int
field_num
,
char
*
new_name
,
Oid
new_adtid
,
Int2
new_adtsize
,
Int4
atttypmod
);
Oid
new_adtid
,
Int2
new_adtsize
,
Int4
atttypmod
);
#endif
#endif
src/interfaces/odbc/connection.h
View file @
9c891acd
...
@@ -93,11 +93,11 @@ typedef enum
...
@@ -93,11 +93,11 @@ typedef enum
#define AUTH_REQ_CRYPT 4
#define AUTH_REQ_CRYPT 4
/* Startup Packet sizes */
/* Startup Packet sizes */
#define SM_DATABASE 64
#define SM_DATABASE
64
#define SM_USER 32
#define SM_USER
32
#define SM_OPTIONS 64
#define SM_OPTIONS
64
#define SM_UNUSED 64
#define SM_UNUSED
64
#define SM_TTY 64
#define SM_TTY
64
/* Old 6.2 protocol defines */
/* Old 6.2 protocol defines */
#define NO_AUTHENTICATION 7
#define NO_AUTHENTICATION 7
...
@@ -200,26 +200,26 @@ struct col_info
...
@@ -200,26 +200,26 @@ struct col_info
#endif
#endif
typedef
BOOL
(
FAR
WINAPI
*
DataSourceToDriverProc
)
(
UDWORD
,
typedef
BOOL
(
FAR
WINAPI
*
DataSourceToDriverProc
)
(
UDWORD
,
SWORD
,
SWORD
,
PTR
,
PTR
,
SDWORD
,
SDWORD
,
PTR
,
PTR
,
SDWORD
,
SDWORD
,
SDWORD
FAR
*
,
SDWORD
FAR
*
,
UCHAR
FAR
*
,
UCHAR
FAR
*
,
SWORD
,
SWORD
,
SWORD
FAR
*
);
SWORD
FAR
*
);
typedef
BOOL
(
FAR
WINAPI
*
DriverToDataSourceProc
)
(
UDWORD
,
typedef
BOOL
(
FAR
WINAPI
*
DriverToDataSourceProc
)
(
UDWORD
,
SWORD
,
SWORD
,
PTR
,
PTR
,
SDWORD
,
SDWORD
,
PTR
,
PTR
,
SDWORD
,
SDWORD
,
SDWORD
FAR
*
,
SDWORD
FAR
*
,
UCHAR
FAR
*
,
UCHAR
FAR
*
,
SWORD
,
SWORD
,
SWORD
FAR
*
);
SWORD
FAR
*
);
/******* The Connection handle ************/
/******* The Connection handle ************/
struct
ConnectionClass_
struct
ConnectionClass_
...
@@ -255,12 +255,12 @@ struct ConnectionClass_
...
@@ -255,12 +255,12 @@ struct ConnectionClass_
/* Accessor functions */
/* Accessor functions */
#define CC_get_socket(x) (x->sock)
#define CC_get_socket(x)
(x->sock)
#define CC_get_database(x) (x->connInfo.database)
#define CC_get_database(x)
(x->connInfo.database)
#define CC_get_server(x) (x->connInfo.server)
#define CC_get_server(x)
(x->connInfo.server)
#define CC_get_DSN(x) (x->connInfo.dsn)
#define CC_get_DSN(x)
(x->connInfo.dsn)
#define CC_get_username(x) (x->connInfo.username)
#define CC_get_username(x)
(x->connInfo.username)
#define CC_is_onlyread(x) (x->connInfo.onlyread[0] == '1')
#define CC_is_onlyread(x)
(x->connInfo.onlyread[0] == '1')
/* for CC_DSN_info */
/* for CC_DSN_info */
...
...
src/interfaces/odbc/dlg_specific.h
View file @
9c891acd
...
@@ -31,46 +31,47 @@
...
@@ -31,46 +31,47 @@
/* INI File Stuff */
/* INI File Stuff */
#ifndef WIN32
#ifndef WIN32
#define ODBC_INI ".odbc.ini"
#define ODBC_INI
".odbc.ini"
#ifdef ODBCINSTDIR
#ifdef ODBCINSTDIR
#define ODBCINST_INI ODBCINSTDIR "/odbcinst.ini"
#define ODBCINST_INI
ODBCINSTDIR "/odbcinst.ini"
#else
#else
#define ODBCINST_INI "/etc/odbcinst.ini"
#define ODBCINST_INI
"/etc/odbcinst.ini"
#warning "location of odbcinst.ini file defaulted to /etc"
#warning "location of odbcinst.ini file defaulted to /etc"
#endif
#endif
#else
/* WIN32 */
#else
/* WIN32 */
#define ODBC_INI
"ODBC.INI"
/* ODBC initialization file */
#define ODBC_INI
"ODBC.INI"
/* ODBC initialization file */
#define ODBCINST_INI
"ODBCINST.INI"
/* ODBC Installation file */
#define ODBCINST_INI
"ODBCINST.INI"
/* ODBC Installation file */
#endif
/* WIN32 */
#endif
/* WIN32 */
#define INI_DSN
DBMS_NAME
/* Name of default Datasource in
#define INI_DSN
DBMS_NAME
/* Name of default Datasource in
* ini file (not used?) */
* ini file (not used?) */
#define INI_KDESC
"Description"
/* Data source description */
#define INI_KDESC
"Description"
/* Data source description */
#define INI_SERVER
"Servername"
/* Name of Server running the
#define INI_SERVER
"Servername"
/* Name of Server running
*
Postgres service */
* the
Postgres service */
#define INI_PORT
"Port"
/* Port on which the Postmaster is
#define INI_PORT
"Port"
/* Port on which the Postmaster is
* listening */
* listening */
#define INI_DATABASE
"Database"
/* Database Name */
#define INI_DATABASE
"Database"
/* Database Name */
#define INI_USER
"Username"
/* Default User Name */
#define INI_USER
"Username"
/* Default User Name */
#define INI_PASSWORD
"Password"
/* Default Password */
#define INI_PASSWORD
"Password"
/* Default Password */
#define INI_DEBUG
"Debug"
/* Debug flag */
#define INI_DEBUG
"Debug"
/* Debug flag */
#define INI_FETCH
"Fetch"
/* Fetch Max Count */
#define INI_FETCH
"Fetch"
/* Fetch Max Count */
#define INI_SOCKET
"Socket"
/* Socket buffer size */
#define INI_SOCKET
"Socket"
/* Socket buffer size */
#define INI_READONLY
"ReadOnly"
/* Database is read only */
#define INI_READONLY
"ReadOnly"
/* Database is read only */
#define INI_COMMLOG
"CommLog"
/* Communication to backend
#define INI_COMMLOG
"CommLog"
/* Communication to backend
* logging */
* logging */
#define INI_PROTOCOL
"Protocol"
/* What protocol (6.2) */
#define INI_PROTOCOL
"Protocol"
/* What protocol (6.2) */
#define INI_OPTIMIZER
"Optimizer"
/* Use backend genetic optimizer */
#define INI_OPTIMIZER
"Optimizer"
/* Use backend genetic optimizer */
#define INI_KSQO
"Ksqo"
/* Keyset query optimization */
#define INI_KSQO
"Ksqo"
/* Keyset query optimization */
#define INI_CONNSETTINGS
"ConnSettings"
/* Anything to send to
#define INI_CONNSETTINGS
"ConnSettings"
/* Anything to send to
* backend on successful
* backend on successful
* connection */
* connection */
#define INI_UNIQUEINDEX "UniqueIndex"
/* Recognize unique indexes */
#define INI_UNIQUEINDEX "UniqueIndex"
/* Recognize unique
#define INI_UNKNOWNSIZES "UnknownSizes"
/* How to handle unknown
* indexes */
#define INI_UNKNOWNSIZES "UnknownSizes"
/* How to handle unknown
* result set sizes */
* result set sizes */
#define INI_CANCELASFREESTMT
"CancelAsFreeStmt"
#define INI_CANCELASFREESTMT
"CancelAsFreeStmt"
#define INI_USEDECLAREFETCH "UseDeclareFetch"
/* Use Declare/Fetch
#define INI_USEDECLAREFETCH "UseDeclareFetch"
/* Use Declare/Fetch
* cursors */
* cursors */
...
@@ -90,9 +91,9 @@
...
@@ -90,9 +91,9 @@
#define INI_PARSE "Parse"
#define INI_PARSE "Parse"
#define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes"
#define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes"
#define INI_TRANSLATIONNAME
"TranslationName"
#define INI_TRANSLATIONNAME
"TranslationName"
#define INI_TRANSLATIONDLL
"TranslationDLL"
#define INI_TRANSLATIONDLL
"TranslationDLL"
#define INI_TRANSLATIONOPTION
"TranslationOption"
#define INI_TRANSLATIONOPTION
"TranslationOption"
/* Connection Defaults */
/* Connection Defaults */
...
...
src/interfaces/odbc/gpps.h
View file @
9c891acd
...
@@ -17,22 +17,22 @@ extern "C"
...
@@ -17,22 +17,22 @@ extern "C"
{
{
#endif
#endif
DWORD
GetPrivateProfileString
(
char
*
theSection
,
/* section name */
DWORD
GetPrivateProfileString
(
char
*
theSection
,
/* section name */
char
*
theKey
,
/* search key name */
char
*
theKey
,
/* search key name */
char
*
theDefault
,
/* default value if not
char
*
theDefault
,
/* default value if not
* found */
* found */
char
*
theReturnBuffer
,
/* return valuse stored
char
*
theReturnBuffer
,
/* return valuse stored
* here */
* here */
size_t
theBufferLength
,
/* byte length of return
size_t
theBufferLength
,
/* byte length of return
* buffer */
* buffer */
char
*
theIniFileName
);
/* pathname of ini file
char
*
theIniFileName
);
/* pathname of ini file
* to search */
* to search */
DWORD
WritePrivateProfileString
(
char
*
theSection
,
/* section name */
DWORD
WritePrivateProfileString
(
char
*
theSection
,
/* section name */
char
*
theKey
,
/* write key name */
char
*
theKey
,
/* write key name */
char
*
theBuffer
,
/* input buffer */
char
*
theBuffer
,
/* input buffer */
char
*
theIniFileName
);
/* pathname of ini file
char
*
theIniFileName
);
/* pathname of ini file
* to write */
* to write */
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/interfaces/odbc/iodbc.h
View file @
9c891acd
...
@@ -57,10 +57,10 @@ typedef int BOOL;
...
@@ -57,10 +57,10 @@ typedef int BOOL;
#endif
/* WIN32 */
#endif
/* WIN32 */
#define SYSERR
(-1)
#define SYSERR
(-1)
#ifndef NULL
#ifndef NULL
#define NULL
((void FAR*)0UL)
#define NULL ((void FAR*)0UL)
#endif
#endif
#endif
#endif
src/interfaces/odbc/isql.h
View file @
9c891acd
...
@@ -19,45 +19,45 @@ typedef void FAR *HSTMT;
...
@@ -19,45 +19,45 @@ typedef void FAR *HSTMT;
typedef
signed
short
RETCODE
;
typedef
signed
short
RETCODE
;
#ifdef WIN32
#ifdef WIN32
#define SQL_API
__stdcall
#define SQL_API
__stdcall
#else
#else
#define SQL_API
EXPORT CALLBACK
#define SQL_API
EXPORT CALLBACK
#endif
#endif
#define ODBCVER
0x0250
#define ODBCVER 0x0250
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
#define SQL_MAX_DSN_LENGTH 32
/* return code */
/* return code */
#define SQL_INVALID_HANDLE
(-2)
#define SQL_INVALID_HANDLE (-2)
#define SQL_ERROR
(-1)
#define SQL_ERROR (-1)
#define SQL_SUCCESS 0
#define SQL_SUCCESS 0
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_NO_DATA_FOUND 100
#define SQL_NO_DATA_FOUND 100
/* standard SQL datatypes (agree with ANSI type numbering) */
/* standard SQL datatypes (agree with ANSI type numbering) */
#define SQL_CHAR
1
#define SQL_CHAR
1
#define SQL_NUMERIC
2
#define SQL_NUMERIC
2
#define SQL_DECIMAL
3
#define SQL_DECIMAL
3
#define SQL_INTEGER
4
#define SQL_INTEGER
4
#define SQL_SMALLINT
5
#define SQL_SMALLINT
5
#define SQL_FLOAT
6
#define SQL_FLOAT
6
#define SQL_REAL
7
#define SQL_REAL
7
#define SQL_DOUBLE
8
#define SQL_DOUBLE
8
#define SQL_VARCHAR
12
#define SQL_VARCHAR
12
#define SQL_TYPE_MIN
SQL_CHAR
#define SQL_TYPE_MIN
SQL_CHAR
#define SQL_TYPE_NUL
0
#define SQL_TYPE_NUL
0
#define SQL_TYPE_MAX
SQL_VARCHAR
#define SQL_TYPE_MAX
SQL_VARCHAR
/* C to SQL datatype mapping */
/* C to SQL datatype mapping */
#define SQL_C_CHAR
SQL_CHAR
#define SQL_C_CHAR
SQL_CHAR
#define SQL_C_LONG
SQL_INTEGER
#define SQL_C_LONG
SQL_INTEGER
#define SQL_C_SHORT
SQL_SMALLINT
#define SQL_C_SHORT
SQL_SMALLINT
#define SQL_C_FLOAT
SQL_REAL
#define SQL_C_FLOAT
SQL_REAL
#define SQL_C_DOUBLE
SQL_DOUBLE
#define SQL_C_DOUBLE
SQL_DOUBLE
#define SQL_C_DEFAULT
99
#define SQL_C_DEFAULT
99
#define SQL_NO_NULLS 0
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE 1
...
@@ -69,18 +69,18 @@ typedef signed short RETCODE;
...
@@ -69,18 +69,18 @@ typedef signed short RETCODE;
#define SQL_NTS (-3)
#define SQL_NTS (-3)
/* SQLFreeStmt flag values */
/* SQLFreeStmt flag values */
#define SQL_CLOSE
0
#define SQL_CLOSE 0
#define SQL_DROP
1
#define SQL_DROP 1
#define SQL_UNBIND
2
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS
3
#define SQL_RESET_PARAMS 3
/* SQLTransact flag values */
/* SQLTransact flag values */
#define SQL_COMMIT
0
#define SQL_COMMIT 0
#define SQL_ROLLBACK
1
#define SQL_ROLLBACK 1
/* SQLColAttributes flag values */
/* SQLColAttributes flag values */
#define SQL_COLUMN_COUNT
0
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_LABEL
18
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLUMN_DRIVER_START 1000
#define SQL_COLUMN_DRIVER_START 1000
...
@@ -95,16 +95,16 @@ typedef signed short RETCODE;
...
@@ -95,16 +95,16 @@ typedef signed short RETCODE;
typedef
unsigned
char
BYTE
;
typedef
unsigned
char
BYTE
;
/* More SQLColAttributes flag values */
/* More SQLColAttributes flag values */
#define SQL_COLUMN_NAME 1
#define SQL_COLUMN_NAME
1
#define SQL_COLUMN_TYPE 2
#define SQL_COLUMN_TYPE
2
#define SQL_COLUMN_LENGTH 3
#define SQL_COLUMN_LENGTH
3
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_PRECISION
4
#define SQL_COLUMN_SCALE 5
#define SQL_COLUMN_SCALE
5
#define SQL_COLUMN_DISPLAY_SIZE
6
#define SQL_COLUMN_DISPLAY_SIZE
6
#define SQL_COLUMN_NULLABLE 7
#define SQL_COLUMN_NULLABLE
7
#define SQL_COLUMN_UNSIGNED 8
#define SQL_COLUMN_UNSIGNED
8
#define SQL_COLUMN_MONEY 9
#define SQL_COLUMN_MONEY
9
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_UPDATABLE
10
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_SEARCHABLE 13
#define SQL_COLUMN_SEARCHABLE 13
...
@@ -114,15 +114,15 @@ typedef unsigned char BYTE;
...
@@ -114,15 +114,15 @@ typedef unsigned char BYTE;
#define SQL_COLUMN_QUALIFIER_NAME 17
#define SQL_COLUMN_QUALIFIER_NAME 17
/* SQLColAttributes Searchable flags */
/* SQLColAttributes Searchable flags */
#define SQL_UNSEARCHABLE 0
#define SQL_UNSEARCHABLE
0
#define SQL_LIKE_ONLY 1
#define SQL_LIKE_ONLY
1
#define SQL_ALL_EXCEPT_LIKE
2
#define SQL_ALL_EXCEPT_LIKE
2
#define SQL_SEARCHABLE 3
#define SQL_SEARCHABLE
3
#define SQL_PRED_SEARCHABLE
SQL_SEARCHABLE
#define SQL_PRED_SEARCHABLE
SQL_SEARCHABLE
/* SQLColAttributes Updateable flags */
/* SQLColAttributes Updateable flags */
#define SQL_ATTR_READONLY 0
#define SQL_ATTR_READONLY
0
#define SQL_ATTR_WRITE 1
#define SQL_ATTR_WRITE
1
#define SQL_ATTR_READWRITE_UNKNOWN 2
#define SQL_ATTR_READWRITE_UNKNOWN 2
/*
/*
...
@@ -133,11 +133,9 @@ extern "C"
...
@@ -133,11 +133,9 @@ 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
,
...
@@ -217,7 +215,8 @@ extern "C"
...
@@ -217,7 +215,8 @@ extern "C"
RETCODE
SQL_API
SQLTransact
(
HENV
henv
,
HDBC
hdbc
,
RETCODE
SQL_API
SQLTransact
(
HENV
henv
,
HDBC
hdbc
,
UWORD
fType
);
UWORD
fType
);
RETCODE
SQL_API
SQLSetParam
(
HSTMT
hstmt
,
UWORD
ipar
,
RETCODE
SQL_API
SQLSetParam
(
HSTMT
hstmt
,
UWORD
ipar
,
SWORD
fCType
,
SWORD
fCType
,
SWORD
fSqlType
,
SWORD
fSqlType
,
UDWORD
cbColDef
,
UDWORD
cbColDef
,
...
...
src/interfaces/odbc/isqlext.h
View file @
9c891acd
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/misc.h
View file @
9c891acd
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
#ifdef MY_LOG
#ifdef MY_LOG
#define MYLOGFILE
"mylog_"
#define MYLOGFILE
"mylog_"
#ifndef WIN32
#ifndef WIN32
#define MYLOGDIR "/tmp"
#define MYLOGDIR "/tmp"
#else
#else
...
@@ -56,7 +56,7 @@ extern void mylog(char *fmt,...);
...
@@ -56,7 +56,7 @@ extern void mylog(char *fmt,...);
#endif
#endif
#ifdef Q_LOG
#ifdef Q_LOG
#define QLOGFILE
"psqlodbc_"
#define QLOGFILE
"psqlodbc_"
#ifndef WIN32
#ifndef WIN32
#define QLOGDIR "/tmp"
#define QLOGDIR "/tmp"
#else
#else
...
@@ -79,13 +79,13 @@ extern void qlog(char *fmt,...);
...
@@ -79,13 +79,13 @@ extern void qlog(char *fmt,...);
#endif
#endif
#ifdef WIN32
#ifdef WIN32
#define PG_BINARY O_BINARY
#define PG_BINARY
O_BINARY
#define PG_BINARY_R
"rb"
#define PG_BINARY_R
"rb"
#define PG_BINARY_W
"wb"
#define PG_BINARY_W
"wb"
#else
#else
#define PG_BINARY 0
#define PG_BINARY
0
#define PG_BINARY_R
"r"
#define PG_BINARY_R
"r"
#define PG_BINARY_W
"w"
#define PG_BINARY_W
"w"
#endif
#endif
...
...
src/interfaces/odbc/pgtypes.h
View file @
9c891acd
...
@@ -55,13 +55,13 @@
...
@@ -55,13 +55,13 @@
#define PG_TYPE_OIDINT2 810
#define PG_TYPE_OIDINT2 810
#define PG_TYPE_OIDINT4 910
#define PG_TYPE_OIDINT4 910
#define PG_TYPE_OIDNAME 911
#define PG_TYPE_OIDNAME 911
#define PG_TYPE_BPCHAR
1042
#define PG_TYPE_BPCHAR 1042
#define PG_TYPE_VARCHAR
1043
#define PG_TYPE_VARCHAR
1043
#define PG_TYPE_DATE
1082
#define PG_TYPE_DATE 1082
#define PG_TYPE_TIME
1083
#define PG_TYPE_TIME 1083
#define PG_TYPE_DATETIME
1184
#define PG_TYPE_DATETIME 1184
#define PG_TYPE_TIMESTAMP
1296
#define PG_TYPE_TIMESTAMP 1296
#define PG_TYPE_NUMERIC
1700
#define PG_TYPE_NUMERIC
1700
/* extern Int4 pgtypes_defined[]; */
/* extern Int4 pgtypes_defined[]; */
extern
Int2
sqlTypes
[];
extern
Int2
sqlTypes
[];
...
...
src/interfaces/odbc/psqlodbc.h
View file @
9c891acd
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Comments: See "notice.txt" for copyright and license information.
* Comments: See "notice.txt" for copyright and license information.
*
*
* $Id: psqlodbc.h,v 1.3
5 2001/02/11 05:58:41
momjian Exp $
* $Id: psqlodbc.h,v 1.3
6 2001/02/11 13:53:42
momjian Exp $
*/
*/
#ifndef __PSQLODBC_H__
#ifndef __PSQLODBC_H__
...
@@ -36,11 +36,11 @@ typedef double SDOUBLE;
...
@@ -36,11 +36,11 @@ typedef double SDOUBLE;
typedef
UInt4
Oid
;
typedef
UInt4
Oid
;
/* Driver stuff */
/* Driver stuff */
#define ODBCVER 0x0250
#define ODBCVER
0x0250
#define DRIVER_ODBC_VER "02.50"
#define DRIVER_ODBC_VER
"02.50"
#define DRIVERNAME "PostgreSQL ODBC"
#define DRIVERNAME
"PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL"
#define DBMS_NAME
"PostgreSQL"
#define POSTGRESDRIVERVERSION "07.01.0003"
#define POSTGRESDRIVERVERSION "07.01.0003"
...
@@ -55,18 +55,17 @@ typedef UInt4 Oid;
...
@@ -55,18 +55,17 @@ typedef UInt4 Oid;
#define BLCKSZ 4096
#define BLCKSZ 4096
#endif
#endif
#define MAX_MESSAGE_LEN 65536
/* This puts a limit on
#define MAX_MESSAGE_LEN 65536
/* This puts a limit on query size
* query size
but I don't */
*
but I don't */
/* see an easy way round this - DJP 24-1-2001 */
/* see an easy way round this - DJP 24-1-2001 */
#define MAX_CONNECT_STRING 4096
#define MAX_CONNECT_STRING 4096
#define ERROR_MSG_LENGTH 4096
#define ERROR_MSG_LENGTH 4096
#define FETCH_MAX 100
/* default number of rows to cache
#define FETCH_MAX 100
/* default number of rows to cache
* for declare/fetch */
* for declare/fetch */
#define TUPLE_MALLOC_INC 100
#define TUPLE_MALLOC_INC 100
#define SOCK_BUFFER_SIZE 4096
/* default socket buffer
#define SOCK_BUFFER_SIZE 4096
/* default socket buffer size */
* size */
#define MAX_CONNECTIONS 128
/* conns per environment
#define MAX_CONNECTIONS 128
/* conns per environment
* (arbitrary) */
* (arbitrary) */
#define MAX_FIELDS 512
#define MAX_FIELDS 512
#define BYTELEN 8
#define BYTELEN 8
#define VARHDRSZ sizeof(Int4)
#define VARHDRSZ sizeof(Int4)
...
@@ -76,24 +75,25 @@ typedef UInt4 Oid;
...
@@ -76,24 +75,25 @@ typedef UInt4 Oid;
#define MAX_CURSOR_LEN 32
#define MAX_CURSOR_LEN 32
/* Registry length limits */
/* Registry length limits */
#define LARGE_REGISTRY_LEN 4096
/* used for special cases */
#define LARGE_REGISTRY_LEN 4096
/* used for special cases */
#define MEDIUM_REGISTRY_LEN 256
/* normal size for
#define MEDIUM_REGISTRY_LEN 256
/* normal size for
* user,database,etc. */
* user,database,etc. */
#define SMALL_REGISTRY_LEN 10
/* for 1/0 settings */
#define SMALL_REGISTRY_LEN 10
/* for 1/0 settings */
/* These prefixes denote system tables */
/* These prefixes denote system tables */
#define POSTGRES_SYS_PREFIX
"pg_"
#define POSTGRES_SYS_PREFIX
"pg_"
#define KEYS_TABLE "dd_fkey"
#define KEYS_TABLE "dd_fkey"
/* Info limits */
/* Info limits */
#define MAX_INFO_STRING 128
#define MAX_INFO_STRING 128
#define MAX_KEYPARTS 20
#define MAX_KEYPARTS 20
#define MAX_KEYLEN 512
/* max key of the form
#define MAX_KEYLEN 512
/* max key of the form
* "date+outlet+invoice" */
* "date+outlet+invoice" */
#define MAX_ROW_SIZE 0
/* Unlimited rowsize with the Tuple
#define MAX_ROW_SIZE 0
/* Unlimited rowsize with the
* Toaster */
* Tuple Toaster */
#define MAX_STATEMENT_LEN 0
/* Unlimited statement size with 7.0 */
#define MAX_STATEMENT_LEN 0
/* Unlimited statement size with
* 7.0 */
/* Previously, numerous query strings were defined of length MAX_STATEMENT_LEN */
/* Previously, numerous query strings were defined of length MAX_STATEMENT_LEN */
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
...
@@ -172,17 +172,18 @@ typedef struct QueryInfo_
...
@@ -172,17 +172,18 @@ typedef struct QueryInfo_
}
QueryInfo
;
}
QueryInfo
;
#define PG_TYPE_LO
-999
/* hack until permanent type
#define PG_TYPE_LO
-999
/* hack until permanent
*
available */
* type
available */
#define PG_TYPE_LO_NAME "lo"
#define PG_TYPE_LO_NAME
"lo"
#define OID_ATTNUM
-2
/* the attnum in pg_index of the
#define OID_ATTNUM
-2
/* the attnum in pg_index of the
* oid */
* oid */
/* sizes */
/* sizes */
#define TEXT_FIELD_SIZE 8190
/* size of text fields (not
#define TEXT_FIELD_SIZE 8190
/* size of text fields
* including null term) */
* (not including null
#define NAME_FIELD_SIZE 32
/* size of name fields */
* term) */
#define MAX_VARCHAR_SIZE 254
/* maximum size of a varchar (not
#define NAME_FIELD_SIZE 32
/* size of name fields */
#define MAX_VARCHAR_SIZE 254
/* maximum size of a varchar (not
* including null term) */
* including null term) */
#define PG_NUMERIC_MAX_PRECISION 1000
#define PG_NUMERIC_MAX_PRECISION 1000
...
...
src/interfaces/odbc/socket.h
View file @
9c891acd
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define closesocket(xxx) close(xxx)
#define closesocket(xxx) close(xxx)
#define SOCKETFD int
#define SOCKETFD int
#ifndef
INADDR_NONE
#ifndef INADDR_NONE
#ifndef _IN_ADDR_T
#ifndef _IN_ADDR_T
#define _IN_ADDR_T
#define _IN_ADDR_T
typedef
unsigned
int
in_addr_t
;
typedef
unsigned
int
in_addr_t
;
...
@@ -42,15 +42,15 @@ typedef unsigned int in_addr_t;
...
@@ -42,15 +42,15 @@ typedef unsigned int in_addr_t;
#include "psqlodbc.h"
#include "psqlodbc.h"
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_HOST_NOT_FOUND
2
#define SOCKET_HOST_NOT_FOUND 2
#define SOCKET_COULD_NOT_CREATE_SOCKET
3
#define SOCKET_COULD_NOT_CREATE_SOCKET 3
#define SOCKET_COULD_NOT_CONNECT
4
#define SOCKET_COULD_NOT_CONNECT 4
#define SOCKET_READ_ERROR
5
#define SOCKET_READ_ERROR 5
#define SOCKET_WRITE_ERROR
6
#define SOCKET_WRITE_ERROR 6
#define SOCKET_NULLPOINTER_PARAMETER
7
#define SOCKET_NULLPOINTER_PARAMETER 7
#define SOCKET_PUT_INT_WRONG_LENGTH
8
#define SOCKET_PUT_INT_WRONG_LENGTH
8
#define SOCKET_GET_INT_WRONG_LENGTH
9
#define SOCKET_GET_INT_WRONG_LENGTH
9
#define SOCKET_CLOSED
10
#define SOCKET_CLOSED 10
struct
SocketClass_
struct
SocketClass_
...
...
src/interfaces/odbc/statement.h
View file @
9c891acd
...
@@ -50,38 +50,38 @@ typedef enum
...
@@ -50,38 +50,38 @@ typedef enum
STMT_EXECUTING
/* statement execution is still going on */
STMT_EXECUTING
/* statement execution is still going on */
}
STMT_Status
;
}
STMT_Status
;
#define STMT_TRUNCATED
(-2)
#define STMT_TRUNCATED (-2)
#define STMT_INFO_ONLY
(-1)
/* not an error message, just a
#define STMT_INFO_ONLY (-1)
/* not an error message, just a
* notification to be returned by SQLError */
* notification to be returned by SQLError */
#define STMT_OK
0
/* will be interpreted as "no error
#define STMT_OK
0
/* will be interpreted as "no error
* pending" */
* pending" */
#define STMT_EXEC_ERROR
1
#define STMT_EXEC_ERROR
1
#define STMT_STATUS_ERROR
2
#define STMT_STATUS_ERROR
2
#define STMT_SEQUENCE_ERROR
3
#define STMT_SEQUENCE_ERROR
3
#define STMT_NO_MEMORY_ERROR
4
#define STMT_NO_MEMORY_ERROR
4
#define STMT_COLNUM_ERROR
5
#define STMT_COLNUM_ERROR
5
#define STMT_NO_STMTSTRING
6
#define STMT_NO_STMTSTRING
6
#define STMT_ERROR_TAKEN_FROM_BACKEND
7
#define STMT_ERROR_TAKEN_FROM_BACKEND
7
#define STMT_INTERNAL_ERROR
8
#define STMT_INTERNAL_ERROR
8
#define STMT_STILL_EXECUTING
9
#define STMT_STILL_EXECUTING
9
#define STMT_NOT_IMPLEMENTED_ERROR
10
#define STMT_NOT_IMPLEMENTED_ERROR
10
#define STMT_BAD_PARAMETER_NUMBER_ERROR
11
#define STMT_BAD_PARAMETER_NUMBER_ERROR
11
#define STMT_OPTION_OUT_OF_RANGE_ERROR
12
#define STMT_OPTION_OUT_OF_RANGE_ERROR
12
#define STMT_INVALID_COLUMN_NUMBER_ERROR
13
#define STMT_INVALID_COLUMN_NUMBER_ERROR
13
#define STMT_RESTRICTED_DATA_TYPE_ERROR
14
#define STMT_RESTRICTED_DATA_TYPE_ERROR
14
#define STMT_INVALID_CURSOR_STATE_ERROR
15
#define STMT_INVALID_CURSOR_STATE_ERROR
15
#define STMT_OPTION_VALUE_CHANGED
16
#define STMT_OPTION_VALUE_CHANGED
16
#define STMT_CREATE_TABLE_ERROR
17
#define STMT_CREATE_TABLE_ERROR
17
#define STMT_NO_CURSOR_NAME
18
#define STMT_NO_CURSOR_NAME
18
#define STMT_INVALID_CURSOR_NAME
19
#define STMT_INVALID_CURSOR_NAME
19
#define STMT_INVALID_ARGUMENT_NO
20
#define STMT_INVALID_ARGUMENT_NO
20
#define STMT_ROW_OUT_OF_RANGE
21
#define STMT_ROW_OUT_OF_RANGE
21
#define STMT_OPERATION_CANCELLED
22
#define STMT_OPERATION_CANCELLED
22
#define STMT_INVALID_CURSOR_POSITION
23
#define STMT_INVALID_CURSOR_POSITION
23
#define STMT_VALUE_OUT_OF_RANGE
24
#define STMT_VALUE_OUT_OF_RANGE
24
#define STMT_OPERATION_INVALID
25
#define STMT_OPERATION_INVALID
25
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE
26
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE
26
#define STMT_BAD_ERROR
27
#define STMT_BAD_ERROR
27
/* statement types */
/* statement types */
enum
enum
...
...
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