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
9f990a73
Commit
9f990a73
authored
Sep 13, 2001
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1) Not export ODBC 3.0 functions.
2) (Maybe) fix a bug reported by Mika Muntila.
parent
f93449eb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
29 deletions
+58
-29
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+10
-3
src/interfaces/odbc/drvconn.c
src/interfaces/odbc/drvconn.c
+3
-0
src/interfaces/odbc/environ.c
src/interfaces/odbc/environ.c
+17
-4
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+20
-0
src/interfaces/odbc/pgtypes.c
src/interfaces/odbc/pgtypes.c
+8
-0
src/interfaces/odbc/psqlodbc_win32.def
src/interfaces/odbc/psqlodbc_win32.def
+0
-22
No files found.
src/interfaces/odbc/convert.c
View file @
9f990a73
...
...
@@ -1674,12 +1674,19 @@ copy_statement_with_parameters(StatementClass *stmt)
if
(
buf
)
{
CVT_APPEND_DATA
(
buf
,
used
);
switch
(
used
)
{
case
SQL_NULL_DATA
:
break
;
case
SQL_NTS
:
CVT_APPEND_STR
(
buf
);
break
;
default:
CVT_APPEND_DATA
(
buf
,
used
);
}
}
else
{
CVT_APPEND_STR
(
param_string
);
}
if
(
param_sqltype
==
SQL_BIT
)
CVT_APPEND_CHAR
(
'\''
);
/* Close Quote */
...
...
src/interfaces/odbc/drvconn.c
View file @
9f990a73
...
...
@@ -230,6 +230,9 @@ dialog:
if
(
len
>=
cbConnStrOutMax
)
{
int
clen
;
for
(
clen
=
strlen
(
szConnStrOut
)
-
1
;
clen
>=
0
&&
szConnStrOut
[
clen
]
!=
';'
;
clen
--
)
szConnStrOut
[
clen
]
=
'\0'
;
result
=
SQL_SUCCESS_WITH_INFO
;
conn
->
errornumber
=
CONN_TRUNCATED
;
conn
->
errormsg
=
"The buffer was too small for the ConnStrOut."
;
...
...
src/interfaces/odbc/environ.c
View file @
9f990a73
...
...
@@ -92,6 +92,8 @@ PGAPI_Error(
{
char
*
msg
;
int
status
;
BOOL
once_again
=
FALSE
;
SWORD
msglen
;
mylog
(
"**** PGAPI_Error: henv=%u, hdbc=%u, hstmt=%u <%d>
\n
"
,
henv
,
hdbc
,
hstmt
,
cbErrorMsgMax
);
...
...
@@ -101,8 +103,6 @@ PGAPI_Error(
{
/* CC: return an error of a hstmt */
StatementClass
*
stmt
=
(
StatementClass
*
)
hstmt
;
SWORD
msglen
;
BOOL
once_again
=
FALSE
;
if
(
SC_get_error
(
stmt
,
&
status
,
&
msg
))
{
...
...
@@ -306,8 +306,15 @@ PGAPI_Error(
return
SQL_NO_DATA_FOUND
;
}
msglen
=
strlen
(
msg
);
if
(
NULL
!=
pcbErrorMsg
)
*
pcbErrorMsg
=
(
SWORD
)
strlen
(
msg
);
{
*
pcbErrorMsg
=
msglen
;
if
(
cbErrorMsgMax
==
0
)
once_again
=
TRUE
;
else
if
(
msglen
>=
cbErrorMsgMax
)
*
pcbErrorMsg
=
cbErrorMsgMax
-
1
;
}
if
((
NULL
!=
szErrorMsg
)
&&
(
cbErrorMsgMax
>
0
))
strncpy_null
(
szErrorMsg
,
msg
,
cbErrorMsgMax
);
if
(
NULL
!=
pfNativeError
)
...
...
@@ -391,7 +398,13 @@ PGAPI_Error(
return
SQL_NO_DATA_FOUND
;
}
return
SQL_SUCCESS
;
if
(
once_again
)
{
conn
->
errornumber
=
status
;
return
SQL_SUCCESS_WITH_INFO
;
}
else
return
SQL_SUCCESS
;
}
else
if
(
SQL_NULL_HENV
!=
henv
)
{
...
...
src/interfaces/odbc/info.c
View file @
9f990a73
...
...
@@ -3614,9 +3614,29 @@ PGAPI_Procedures(
SWORD
cbProcName
)
{
static
char
*
func
=
"PGAPI_Procedures"
;
StatementClass
*
stmt
=
(
StatementClass
*
)
hstmt
;
Int2
result_cols
;
mylog
(
"%s: entering...
\n
"
,
func
);
/*
* a statement is actually executed, so we'll have to do this
* ourselves.
*/
result_cols
=
8
;
extend_bindings
(
stmt
,
result_cols
);
/* set the field names */
QR_set_num_fields
(
stmt
->
result
,
result_cols
);
QR_set_field_info
(
stmt
->
result
,
0
,
"PROCEDURE_CAT"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
1
,
"PROCEDURE_SCHEM"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
2
,
"PROCEDURE_NAME"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
3
,
"NUM_INPUT_PARAMS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
4
,
"NUM_OUTPUT_PARAMS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
5
,
"NUM_RESULT_SET"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
6
,
"REMARKS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
7
,
"PROCEDURE_TYPE"
,
PG_TYPE_INT2
,
2
);
SC_log_error
(
func
,
"Function not implemented"
,
(
StatementClass
*
)
hstmt
);
return
SQL_ERROR
;
}
...
...
src/interfaces/odbc/pgtypes.c
View file @
9f990a73
...
...
@@ -698,7 +698,15 @@ pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_
/* Character types (and NUMERIC) use the default precision */
case
PG_TYPE_VARCHAR
:
case
PG_TYPE_BPCHAR
:
#ifdef MULTIBYTE
/* after 7.2 */
if
(
PG_VERSION_GE
(
SC_get_conn
(
stmt
),
7
.
2
)
return
3
*
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
else
#else
/* CR -> CR/LF */
return
2
*
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
#endif
/* MULTIBYTE */
default:
return
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
}
...
...
src/interfaces/odbc/psqlodbc_win32.def
View file @
9f990a73
...
...
@@ -53,28 +53,6 @@ SQLSetPos @68
SQLSetScrollOptions @69
SQLTablePrivileges @70
SQLBindParameter @72
SQLAllocHandle @80
SQLBindParam @81
SQLCloseCursor @82
SQLColAttribute @83
SQLCopyDesc @84
SQLEndTran @85
SQLFetchScroll @86
SQLFreeHandle @87
SQLGetDescField @88
SQLGetDescRec @89
SQLGetDiagField @90
SQLGetDiagRec @91
SQLGetEnvAttr @92
SQLGetConnectAttr @93
SQLGetStmtAttr @94
SQLSetConnectAttr @95
SQLSetDescField @96
SQLSetDescRec @97
SQLSetEnvAttr @98
SQLSetStmtAttr @99
SQLDummyOrdinal @199
dconn_FDriverConnectProc @200
DllMain @201
...
...
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