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
51b55730
Commit
51b55730
authored
Mar 25, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for ODBC compile warnings.
parent
918feb61
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
45 deletions
+54
-45
src/interfaces/odbc/bind.c
src/interfaces/odbc/bind.c
+1
-1
src/interfaces/odbc/connection.c
src/interfaces/odbc/connection.c
+1
-2
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+35
-31
src/interfaces/odbc/dlg_specific.c
src/interfaces/odbc/dlg_specific.c
+3
-3
src/interfaces/odbc/environ.c
src/interfaces/odbc/environ.c
+2
-3
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+1
-1
src/interfaces/odbc/multibyte.c
src/interfaces/odbc/multibyte.c
+2
-2
src/interfaces/odbc/multibyte.h
src/interfaces/odbc/multibyte.h
+3
-0
src/interfaces/odbc/pgtypes.c
src/interfaces/odbc/pgtypes.c
+4
-0
src/interfaces/odbc/qresult.c
src/interfaces/odbc/qresult.c
+2
-2
No files found.
src/interfaces/odbc/bind.c
View file @
51b55730
...
...
@@ -340,7 +340,7 @@ PGAPI_ParamOptions(
mylog
(
"%s: entering... %d %x
\n
"
,
func
,
crow
,
pirow
);
stmt
->
options
.
paramset_size
=
crow
;
stmt
->
options
.
param_processed_ptr
=
pirow
;
stmt
->
options
.
param_processed_ptr
=
(
SQLUINTEGER
*
)
pirow
;
return
SQL_SUCCESS
;
}
...
...
src/interfaces/odbc/connection.c
View file @
51b55730
...
...
@@ -1130,8 +1130,7 @@ CC_get_error(ConnectionClass *self, int *number, char **message)
QResultClass
*
CC_send_query
(
ConnectionClass
*
self
,
char
*
query
,
QueryInfo
*
qi
,
UDWORD
flag
)
{
QResultClass
*
result_in
=
NULL
,
*
cmdres
=
NULL
,
QResultClass
*
cmdres
=
NULL
,
*
retres
=
NULL
,
*
res
=
NULL
;
BOOL
clear_result_on_abort
=
((
flag
&
CLEAR_RESULT_ON_ABORT
)
!=
0
),
...
...
src/interfaces/odbc/convert.c
View file @
51b55730
...
...
@@ -161,7 +161,9 @@ timestamp2stime(const char *str, SIMPLE_TIME *st, BOOL *bZone, int *zone)
*
ptr
;
int
scnt
,
i
;
#if defined(WIN32) || defined(HAVE_INT_TIMEZONE)
long
timediff
;
#endif
BOOL
withZone
=
*
bZone
;
*
bZone
=
FALSE
;
...
...
@@ -1431,7 +1433,8 @@ copy_statement_with_parameters(StatementClass *stmt)
*/
else
if
(
oldchar
==
'{'
)
{
char
*
begin
=
&
old_statement
[
opos
],
*
end
;
char
*
begin
=
&
old_statement
[
opos
];
const
char
*
end
;
/* procedure calls */
if
(
stmt
->
statement_type
==
STMT_TYPE_PROCCALL
)
...
...
@@ -1463,8 +1466,8 @@ copy_statement_with_parameters(StatementClass *stmt)
proc_no_param
=
FALSE
;
continue
;
}
if
(
convert_escape
(
begin
,
stmt
,
&
npos
,
&
new_stsize
,
&
end
)
!=
CONVERT_ESCAPE_OK
)
if
(
convert_escape
(
begin
,
stmt
,
&
npos
,
&
new_stsize
,
&
end
)
!=
CONVERT_ESCAPE_OK
)
{
stmt
->
errormsg
=
"ODBC escape convert error"
;
stmt
->
errornumber
=
STMT_EXEC_ERROR
;
...
...
@@ -2449,7 +2452,8 @@ int processParameters(const ConnectionClass *conn, const char *value,
*/
int
convert_escape
(
const
char
*
value
,
StatementClass
*
stmt
,
int
*
npos
,
int
*
stsize
,
const
char
**
val_resume
)
convert_escape
(
const
char
*
value
,
StatementClass
*
stmt
,
int
*
npos
,
int
*
stsize
,
const
char
**
val_resume
)
{
int
ret
,
pos
=
*
npos
;
UInt4
count
;
...
...
src/interfaces/odbc/dlg_specific.c
View file @
51b55730
...
...
@@ -641,7 +641,7 @@ makeConnectString(char *connect_string, const ConnInfo *ci, UWORD len)
flag
|=
BIT_TRUEISMINUS1
;
sprintf
(
&
connect_string
[
hlen
],
";A6=%s;A7=%d;A8=%d;B0=%d;B1=%d;C2=%s;CX=%02x%x"
,
";A6=%s;A7=%d;A8=%d;B0=%d;B1=%d;C2=%s;CX=%02x%
l
x"
,
encoded_conn_settings
,
ci
->
drivers
.
fetch_max
,
ci
->
drivers
.
socket_buffersize
,
...
...
@@ -662,7 +662,7 @@ unfoldCXAttribute(ConnInfo *ci, const char *value)
if
(
strlen
(
value
)
<
2
)
{
count
=
3
;
sscanf
(
value
,
"%x"
,
&
flag
);
sscanf
(
value
,
"%
l
x"
,
&
flag
);
}
else
{
...
...
@@ -670,7 +670,7 @@ unfoldCXAttribute(ConnInfo *ci, const char *value)
memcpy
(
cnt
,
value
,
2
);
cnt
[
2
]
=
'\0'
;
sscanf
(
cnt
,
"%x"
,
&
count
);
sscanf
(
value
+
2
,
"%x"
,
&
flag
);
sscanf
(
value
+
2
,
"%
l
x"
,
&
flag
);
}
ci
->
disallow_premature
=
(
char
)((
flag
&
BIT_DISALLOWPREMATURE
)
!=
0
);
ci
->
updatable_cursors
=
(
char
)((
flag
&
BIT_UPDATABLECURSORS
)
!=
0
);
...
...
src/interfaces/odbc/environ.c
View file @
51b55730
...
...
@@ -94,9 +94,8 @@ PGAPI_StmtError( HSTMT hstmt,
StatementClass
*
stmt
=
(
StatementClass
*
)
hstmt
;
char
*
msg
;
int
status
;
BOOL
once_again
=
FALSE
,
partial_ok
=
(
flag
&
PODBC_ALLOW_PARTIAL_EXTRACT
!=
0
),
clear_str
=
(
flag
&
PODBC_ERROR_CLEAR
!=
0
);
BOOL
partial_ok
=
((
flag
&
PODBC_ALLOW_PARTIAL_EXTRACT
)
!=
0
),
clear_str
=
((
flag
&
PODBC_ERROR_CLEAR
)
!=
0
);
SWORD
msglen
,
stapos
,
wrtlen
,
pcblen
;
mylog
(
"**** PGAPI_StmtError: hstmt=%u <%d>
\n
"
,
hstmt
,
cbErrorMsgMax
);
...
...
src/interfaces/odbc/info.c
View file @
51b55730
...
...
@@ -3983,7 +3983,7 @@ PGAPI_TablePrivileges(
char
*
grolist
,
*
uid
,
*
delm
;
snprintf
(
proc_query
,
sizeof
(
proc_query
)
-
1
,
"select grolist from pg_group where groname = '%s'"
,
user
);
if
(
gres
=
CC_send_query
(
conn
,
proc_query
,
NULL
,
CLEAR_RESULT_ON_ABORT
))
if
(
(
gres
=
CC_send_query
(
conn
,
proc_query
,
NULL
,
CLEAR_RESULT_ON_ABORT
)
))
{
grolist
=
QR_get_value_backend_row
(
gres
,
0
,
0
);
if
(
grolist
&&
grolist
[
0
]
==
'{'
)
...
...
src/interfaces/odbc/multibyte.c
View file @
51b55730
...
...
@@ -228,8 +228,8 @@ pg_CS_stat(int stat,unsigned int character,int characterset_code)
character
>
0xa0
)
stat
=
3
;
else
if
(
stat
==
3
||
stat
<
2
&&
character
>
0xa0
)
(
stat
<
2
&&
character
>
0xa0
)
)
stat
=
2
;
else
if
(
stat
==
2
)
stat
=
1
;
...
...
src/interfaces/odbc/multibyte.h
View file @
51b55730
...
...
@@ -86,4 +86,7 @@ void encoded_str_constr(encoded_str *encstr, int ccsc, const char *str);
#define make_encoded_str(encstr, conn, str) encoded_str_constr(encstr, conn->ccsc, str)
extern
int
encoded_nextchar
(
encoded_str
*
encstr
);
extern
int
encoded_byte_check
(
encoded_str
*
encstr
,
int
abspos
);
/* This doesn't seem to be called by anyone, bjm 2002-03-24 */
extern
int
pg_ismb
(
int
characterset_code
);
#define check_client_encoding(X) pg_CS_name(pg_CS_code(X))
src/interfaces/odbc/pgtypes.c
View file @
51b55730
...
...
@@ -234,7 +234,9 @@ pgtype_to_sqltype(StatementClass *stmt, Int4 type)
{
ConnectionClass
*
conn
=
SC_get_conn
(
stmt
);
ConnInfo
*
ci
=
&
(
conn
->
connInfo
);
#if (ODBCVER >= 0x0300)
EnvironmentClass
*
env
=
(
EnvironmentClass
*
)
(
conn
->
henv
);
#endif
switch
(
type
)
{
...
...
@@ -342,7 +344,9 @@ pgtype_to_ctype(StatementClass *stmt, Int4 type)
{
ConnectionClass
*
conn
=
SC_get_conn
(
stmt
);
ConnInfo
*
ci
=
&
(
conn
->
connInfo
);
#if (ODBCVER >= 0x0300)
EnvironmentClass
*
env
=
(
EnvironmentClass
*
)
(
conn
->
henv
);
#endif
switch
(
type
)
{
...
...
src/interfaces/odbc/qresult.c
View file @
51b55730
...
...
@@ -731,10 +731,10 @@ QR_read_tuple(QResultClass *self, char binary)
if
(
this_keyset
)
{
if
(
this_tuplefield
[
num_fields
-
2
].
value
)
sscanf
(
this_tuplefield
[
num_fields
-
2
].
value
,
"(%u,%hu)"
,
sscanf
(
this_tuplefield
[
num_fields
-
2
].
value
,
"(%
l
u,%hu)"
,
&
this_keyset
->
blocknum
,
&
this_keyset
->
offset
);
if
(
this_tuplefield
[
num_fields
-
1
].
value
)
sscanf
(
this_tuplefield
[
num_fields
-
1
].
value
,
"%u"
,
sscanf
(
this_tuplefield
[
num_fields
-
1
].
value
,
"%
l
u"
,
&
this_keyset
->
oid
);
}
self
->
currTuple
++
;
...
...
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