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
0521051b
Commit
0521051b
authored
Sep 11, 2001
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some multibyte related bugs.
Psqlodbc is 7.01.0007 now. Hiroshi Inoue
parent
7e99cea8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
src/interfaces/odbc/connection.c
src/interfaces/odbc/connection.c
+8
-2
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+4
-0
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+2
-1
src/interfaces/odbc/parse.c
src/interfaces/odbc/parse.c
+7
-0
No files found.
src/interfaces/odbc/connection.c
View file @
0521051b
...
...
@@ -551,13 +551,19 @@ CC_connect(ConnectionClass *self, char do_password)
ci
->
drivers
.
bools_as_char
);
#ifdef MULTIBYTE
encoding
=
check_client_encoding
(
ci
->
drivers
.
conn_settings
);
encoding
=
check_client_encoding
(
ci
->
conn_settings
);
if
(
encoding
&&
strcmp
(
encoding
,
"OTHER"
))
self
->
client_encoding
=
strdup
(
encoding
);
else
{
encoding
=
check_client_encoding
(
ci
->
drivers
.
conn_settings
);
if
(
encoding
&&
strcmp
(
encoding
,
"OTHER"
))
self
->
client_encoding
=
strdup
(
encoding
);
}
qlog
(
" extra_systable_prefixes='%s', conn_settings='%s' conn_encoding='%s'
\n
"
,
ci
->
drivers
.
extra_systable_prefixes
,
ci
->
drivers
.
conn_settings
,
check_client_encoding
(
ci
->
drivers
.
conn_settings
)
);
encoding
?
encoding
:
""
);
#else
qlog
(
" extra_systable_prefixes='%s', conn_settings='%s'
\n
"
,
ci
->
drivers
.
extra_systable_prefixes
,
...
...
src/interfaces/odbc/convert.c
View file @
0521051b
...
...
@@ -1156,7 +1156,11 @@ copy_statement_with_parameters(StatementClass *stmt)
}
opos
+=
lit_call_len
;
CVT_APPEND_STR
(
"SELECT "
);
#ifdef MULTIBYTE
if
(
multibyte_strchr
(
&
old_statement
[
opos
],
'('
))
#else
if
(
strchr
(
&
old_statement
[
opos
],
'('
))
#endif
/* MULTIBYTE */
proc_no_param
=
FALSE
;
continue
;
}
...
...
src/interfaces/odbc/info.c
View file @
0521051b
...
...
@@ -826,7 +826,6 @@ PGAPI_GetTypeInfo(
RETCODE
SQL_API
/*SQLGetFunctions(*/
PGAPI_GetFunctions
(
HDBC
hdbc
,
UWORD
fFunction
,
...
...
@@ -2202,6 +2201,8 @@ PGAPI_Statistics(
" and i.indexrelid = c.oid"
" and c.relam = a.oid"
,
table_name
);
if
(
PG_VERSION_GT
(
SC_get_conn
(
stmt
),
6
.
4
))
strcat
(
index_query
,
" order by i.indisprimary desc"
);
result
=
PGAPI_ExecDirect
(
hindx_stmt
,
index_query
,
strlen
(
index_query
));
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
...
...
src/interfaces/odbc/parse.c
View file @
0521051b
...
...
@@ -616,7 +616,14 @@ in_expr = TRUE;
/* lower case table name */
for
(
ptr
=
ti
[
stmt
->
ntab
]
->
name
;
*
ptr
;
ptr
++
)
{
#ifdef MULTIBYTE
if
((
unsigned
char
)
*
ptr
>=
0x80
)
ptr
++
;
else
#endif
/* MULTIBYTE */
*
ptr
=
tolower
((
unsigned
char
)
*
ptr
);
}
}
mylog
(
"got table = '%s'
\n
"
,
ti
[
stmt
->
ntab
]
->
name
);
...
...
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