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
89d6f680
Commit
89d6f680
authored
Jun 06, 2002
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add *Int8 As* option.
parent
52069570
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1084 additions
and
697 deletions
+1084
-697
src/interfaces/odbc/connection.c
src/interfaces/odbc/connection.c
+31
-0
src/interfaces/odbc/connection.h
src/interfaces/odbc/connection.h
+4
-0
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+0
-2
src/interfaces/odbc/descriptor.h
src/interfaces/odbc/descriptor.h
+2
-1
src/interfaces/odbc/dlg_specific.c
src/interfaces/odbc/dlg_specific.c
+131
-479
src/interfaces/odbc/dlg_specific.h
src/interfaces/odbc/dlg_specific.h
+8
-1
src/interfaces/odbc/dlg_wingui.c
src/interfaces/odbc/dlg_wingui.c
+486
-0
src/interfaces/odbc/drvconn.c
src/interfaces/odbc/drvconn.c
+6
-5
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+11
-11
src/interfaces/odbc/info30.c
src/interfaces/odbc/info30.c
+6
-6
src/interfaces/odbc/misc.c
src/interfaces/odbc/misc.c
+7
-6
src/interfaces/odbc/misc.h
src/interfaces/odbc/misc.h
+1
-1
src/interfaces/odbc/multibyte.c
src/interfaces/odbc/multibyte.c
+38
-0
src/interfaces/odbc/parse.c
src/interfaces/odbc/parse.c
+116
-42
src/interfaces/odbc/pgtypes.c
src/interfaces/odbc/pgtypes.c
+22
-3
src/interfaces/odbc/psqlodbc.h
src/interfaces/odbc/psqlodbc.h
+1
-1
src/interfaces/odbc/psqlodbc.rc
src/interfaces/odbc/psqlodbc.rc
+145
-107
src/interfaces/odbc/resource.h
src/interfaces/odbc/resource.h
+11
-1
src/interfaces/odbc/results.c
src/interfaces/odbc/results.c
+3
-1
src/interfaces/odbc/setup.c
src/interfaces/odbc/setup.c
+13
-29
src/interfaces/odbc/statement.c
src/interfaces/odbc/statement.c
+6
-0
src/interfaces/odbc/win32.mak
src/interfaces/odbc/win32.mak
+12
-0
src/interfaces/odbc/win32_30.mak
src/interfaces/odbc/win32_30.mak
+12
-1
src/interfaces/odbc/win32_30w.mak
src/interfaces/odbc/win32_30w.mak
+12
-0
No files found.
src/interfaces/odbc/connection.c
View file @
89d6f680
...
@@ -240,6 +240,7 @@ CC_conninfo_init(ConnInfo *conninfo)
...
@@ -240,6 +240,7 @@ CC_conninfo_init(ConnInfo *conninfo)
conninfo
->
allow_keyset
=
-
1
;
conninfo
->
allow_keyset
=
-
1
;
conninfo
->
lf_conversion
=
-
1
;
conninfo
->
lf_conversion
=
-
1
;
conninfo
->
true_is_minus1
=
-
1
;
conninfo
->
true_is_minus1
=
-
1
;
conninfo
->
int8_as
=
-
101
;
memcpy
(
&
(
conninfo
->
drivers
),
&
globals
,
sizeof
(
globals
));
memcpy
(
&
(
conninfo
->
drivers
),
&
globals
,
sizeof
(
globals
));
}
}
/*
/*
...
@@ -298,6 +299,7 @@ CC_Constructor()
...
@@ -298,6 +299,7 @@ CC_Constructor()
rv
->
client_encoding
=
NULL
;
rv
->
client_encoding
=
NULL
;
rv
->
server_encoding
=
NULL
;
rv
->
server_encoding
=
NULL
;
#endif
/* MULTIBYTE */
#endif
/* MULTIBYTE */
rv
->
current_schema
=
NULL
;
/* Initialize statement options to defaults */
/* Initialize statement options to defaults */
...
@@ -503,6 +505,9 @@ CC_cleanup(ConnectionClass *self)
...
@@ -503,6 +505,9 @@ CC_cleanup(ConnectionClass *self)
free
(
self
->
server_encoding
);
free
(
self
->
server_encoding
);
self
->
server_encoding
=
NULL
;
self
->
server_encoding
=
NULL
;
#endif
/* MULTIBYTE */
#endif
/* MULTIBYTE */
if
(
self
->
current_schema
)
free
(
self
->
current_schema
);
self
->
current_schema
=
NULL
;
/* Free cached table info */
/* Free cached table info */
if
(
self
->
col_info
)
if
(
self
->
col_info
)
{
{
...
@@ -513,6 +518,8 @@ CC_cleanup(ConnectionClass *self)
...
@@ -513,6 +518,8 @@ CC_cleanup(ConnectionClass *self)
if
(
self
->
col_info
[
i
]
->
result
)
/* Free the SQLColumns result structure */
if
(
self
->
col_info
[
i
]
->
result
)
/* Free the SQLColumns result structure */
QR_Destructor
(
self
->
col_info
[
i
]
->
result
);
QR_Destructor
(
self
->
col_info
[
i
]
->
result
);
if
(
self
->
col_info
[
i
]
->
schema
)
free
(
self
->
col_info
[
i
]
->
schema
);
free
(
self
->
col_info
[
i
]);
free
(
self
->
col_info
[
i
]);
}
}
free
(
self
->
col_info
);
free
(
self
->
col_info
);
...
@@ -986,6 +993,9 @@ another_version_retry:
...
@@ -986,6 +993,9 @@ another_version_retry:
}
}
}
}
}
}
#else
{
}
#endif
/* UNICODE_SUPPORT */
#endif
/* UNICODE_SUPPORT */
}
}
#ifdef UNICODE_SUPPORT
#ifdef UNICODE_SUPPORT
...
@@ -2046,6 +2056,27 @@ CC_get_max_query_len(const ConnectionClass *conn)
...
@@ -2046,6 +2056,27 @@ CC_get_max_query_len(const ConnectionClass *conn)
return
value
;
return
value
;
}
}
/*
* This deosn't really return the CURRENT SCHEMA
* but there's no alternative.
*/
const
char
*
CC_get_current_schema
(
ConnectionClass
*
conn
)
{
if
(
!
conn
->
current_schema
&&
conn
->
schema_support
)
{
QResultClass
*
res
;
if
(
res
=
CC_send_query
(
conn
,
"select current_schema()"
,
NULL
,
CLEAR_RESULT_ON_ABORT
),
res
)
{
if
(
QR_get_num_total_tuples
(
res
)
==
1
)
conn
->
current_schema
=
strdup
(
QR_get_value_backend_row
(
res
,
0
,
0
));
QR_Destructor
(
res
);
}
}
return
(
const
char
*
)
conn
->
current_schema
;
}
int
int
CC_send_cancel_request
(
const
ConnectionClass
*
conn
)
CC_send_cancel_request
(
const
ConnectionClass
*
conn
)
{
{
...
...
src/interfaces/odbc/connection.h
View file @
89d6f680
...
@@ -170,6 +170,7 @@ typedef struct
...
@@ -170,6 +170,7 @@ typedef struct
char
updatable_cursors
;
char
updatable_cursors
;
char
lf_conversion
;
char
lf_conversion
;
char
true_is_minus1
;
char
true_is_minus1
;
char
int8_as
;
GLOBAL_VALUES
drivers
;
/* moved from driver's option */
GLOBAL_VALUES
drivers
;
/* moved from driver's option */
}
ConnInfo
;
}
ConnInfo
;
...
@@ -219,6 +220,7 @@ typedef struct
...
@@ -219,6 +220,7 @@ typedef struct
struct
col_info
struct
col_info
{
{
QResultClass
*
result
;
QResultClass
*
result
;
char
*
schema
;
char
name
[
MAX_TABLE_LEN
+
1
];
char
name
[
MAX_TABLE_LEN
+
1
];
};
};
...
@@ -298,6 +300,7 @@ struct ConnectionClass_
...
@@ -298,6 +300,7 @@ struct ConnectionClass_
int
be_pid
;
/* pid returned by backend */
int
be_pid
;
/* pid returned by backend */
int
be_key
;
/* auth code needed to send cancel */
int
be_key
;
/* auth code needed to send cancel */
UInt4
isolation
;
UInt4
isolation
;
char
*
current_schema
;
};
};
...
@@ -343,6 +346,7 @@ int CC_send_cancel_request(const ConnectionClass *conn);
...
@@ -343,6 +346,7 @@ int CC_send_cancel_request(const ConnectionClass *conn);
void
CC_on_commit
(
ConnectionClass
*
conn
);
void
CC_on_commit
(
ConnectionClass
*
conn
);
void
CC_on_abort
(
ConnectionClass
*
conn
,
UDWORD
opt
);
void
CC_on_abort
(
ConnectionClass
*
conn
,
UDWORD
opt
);
void
ProcessRollback
(
ConnectionClass
*
conn
,
BOOL
undo
);
void
ProcessRollback
(
ConnectionClass
*
conn
,
BOOL
undo
);
const
char
*
CC_get_current_schema
(
ConnectionClass
*
conn
);
/* CC_send_query options */
/* CC_send_query options */
#define CLEAR_RESULT_ON_ABORT 1L
#define CLEAR_RESULT_ON_ABORT 1L
...
...
src/interfaces/odbc/convert.c
View file @
89d6f680
...
@@ -497,7 +497,6 @@ copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2
...
@@ -497,7 +497,6 @@ copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2
*/
*/
bZone
=
FALSE
;
/* time zone stuff is unreliable */
bZone
=
FALSE
;
/* time zone stuff is unreliable */
timestamp2stime
(
value
,
&
st
,
&
bZone
,
&
zone
);
timestamp2stime
(
value
,
&
st
,
&
bZone
,
&
zone
);
inolog
(
"2stime fr=%d
\n
"
,
st
.
fr
);
}
}
else
else
{
{
...
@@ -1096,7 +1095,6 @@ inolog("2stime fr=%d\n", st.fr);
...
@@ -1096,7 +1095,6 @@ inolog("2stime fr=%d\n", st.fr);
case
SQL_C_ULONG
:
case
SQL_C_ULONG
:
len
=
4
;
len
=
4
;
inolog
(
"rgb=%x + %d, pcb=%x, set %s
\n
"
,
rgbValue
,
bind_row
*
bind_size
,
pcbValue
,
neut_str
);
if
(
bind_size
>
0
)
if
(
bind_size
>
0
)
*
(
UDWORD
*
)
((
char
*
)
rgbValue
+
(
bind_row
*
bind_size
))
=
atol
(
neut_str
);
*
(
UDWORD
*
)
((
char
*
)
rgbValue
+
(
bind_row
*
bind_size
))
=
atol
(
neut_str
);
else
else
...
...
src/interfaces/odbc/descriptor.h
View file @
89d6f680
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Comments: See "notice.txt" for copyright and license information.
* Comments: See "notice.txt" for copyright and license information.
*
*
* $Id: descriptor.h,v 1.
5 2002/05/22 05:51:03
inoue Exp $
* $Id: descriptor.h,v 1.
6 2002/06/06 04:50:47
inoue Exp $
*
*
*/
*/
...
@@ -41,6 +41,7 @@ typedef struct
...
@@ -41,6 +41,7 @@ typedef struct
char
dot
[
MAX_TABLE_LEN
+
1
];
char
dot
[
MAX_TABLE_LEN
+
1
];
char
name
[
MAX_COLUMN_LEN
+
1
];
char
name
[
MAX_COLUMN_LEN
+
1
];
char
alias
[
MAX_COLUMN_LEN
+
1
];
char
alias
[
MAX_COLUMN_LEN
+
1
];
char
*
schema
;
}
FIELD_INFO
;
}
FIELD_INFO
;
Int4
FI_precision
(
const
FIELD_INFO
*
);
Int4
FI_precision
(
const
FIELD_INFO
*
);
Int4
FI_scale
(
const
FIELD_INFO
*
);
Int4
FI_scale
(
const
FIELD_INFO
*
);
...
...
src/interfaces/odbc/dlg_specific.c
View file @
89d6f680
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/dlg_specific.h
View file @
89d6f680
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
#define INI_UPDATABLECURSORS "UpdatableCursors"
#define INI_UPDATABLECURSORS "UpdatableCursors"
#define INI_LFCONVERSION "LFConversion"
#define INI_LFCONVERSION "LFConversion"
#define INI_TRUEISMINUS1 "TrueIsMinus1"
#define INI_TRUEISMINUS1 "TrueIsMinus1"
#define INI_INT8AS "BI"
/* Bit representaion for abbreviated connection strings */
/* Bit representaion for abbreviated connection strings */
#define BIT_LFCONVERSION (1L)
#define BIT_LFCONVERSION (1L)
#define BIT_UPDATABLECURSORS (1L<<1)
#define BIT_UPDATABLECURSORS (1L<<1)
...
@@ -160,6 +161,7 @@
...
@@ -160,6 +161,7 @@
#else
#else
#define DEFAULT_LFCONVERSION 0
#define DEFAULT_LFCONVERSION 0
#endif
/* WIN32 */
#endif
/* WIN32 */
#define DEFAULT_INT8AS 0
/* prototypes */
/* prototypes */
void
getCommonDefaults
(
const
char
*
section
,
const
char
*
filename
,
ConnInfo
*
ci
);
void
getCommonDefaults
(
const
char
*
section
,
const
char
*
filename
,
ConnInfo
*
ci
);
...
@@ -172,13 +174,18 @@ int CALLBACK driver_optionsProc(HWND hdlg,
...
@@ -172,13 +174,18 @@ int CALLBACK driver_optionsProc(HWND hdlg,
UINT
wMsg
,
UINT
wMsg
,
WPARAM
wParam
,
WPARAM
wParam
,
LPARAM
lParam
);
LPARAM
lParam
);
int
CALLBACK
ds_optionsProc
(
HWND
hdlg
,
int
CALLBACK
ds_options1Proc
(
HWND
hdlg
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
int
CALLBACK
ds_options2Proc
(
HWND
hdlg
,
UINT
wMsg
,
UINT
wMsg
,
WPARAM
wParam
,
WPARAM
wParam
,
LPARAM
lParam
);
LPARAM
lParam
);
#endif
/* WIN32 */
#endif
/* WIN32 */
void
updateGlobals
(
void
);
void
updateGlobals
(
void
);
void
writeDriverCommoninfo
(
const
ConnInfo
*
ci
);
void
writeDSNinfo
(
const
ConnInfo
*
ci
);
void
writeDSNinfo
(
const
ConnInfo
*
ci
);
void
getDSNdefaults
(
ConnInfo
*
ci
);
void
getDSNdefaults
(
ConnInfo
*
ci
);
void
getDSNinfo
(
ConnInfo
*
ci
,
char
overwrite
);
void
getDSNinfo
(
ConnInfo
*
ci
,
char
overwrite
);
...
...
src/interfaces/odbc/dlg_wingui.c
0 → 100644
View file @
89d6f680
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/drvconn.c
View file @
89d6f680
...
@@ -293,6 +293,7 @@ dconn_FDriverConnectProc(
...
@@ -293,6 +293,7 @@ dconn_FDriverConnectProc(
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DSNAME
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DSNAME
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DESCTEXT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DESCTEXT
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DESC
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DESC
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
IDC_DRIVER
),
SW_HIDE
);
SetWindowLong
(
hdlg
,
DWL_USER
,
lParam
);
/* Save the ConnInfo for
SetWindowLong
(
hdlg
,
DWL_USER
,
lParam
);
/* Save the ConnInfo for
* the "OK" */
* the "OK" */
...
@@ -322,16 +323,16 @@ dconn_FDriverConnectProc(
...
@@ -322,16 +323,16 @@ dconn_FDriverConnectProc(
EndDialog
(
hdlg
,
GET_WM_COMMAND_ID
(
wParam
,
lParam
)
==
IDOK
);
EndDialog
(
hdlg
,
GET_WM_COMMAND_ID
(
wParam
,
lParam
)
==
IDOK
);
return
TRUE
;
return
TRUE
;
case
IDC_D
RIVER
:
case
IDC_D
ATASOURCE
:
ci
=
(
ConnInfo
*
)
GetWindowLong
(
hdlg
,
DWL_USER
);
ci
=
(
ConnInfo
*
)
GetWindowLong
(
hdlg
,
DWL_USER
);
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_DRV
),
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_DRV
),
hdlg
,
d
river_options
Proc
,
(
LPARAM
)
ci
);
hdlg
,
d
s_options1
Proc
,
(
LPARAM
)
ci
);
break
;
break
;
case
IDC_D
ATASOURCE
:
case
IDC_D
RIVER
:
ci
=
(
ConnInfo
*
)
GetWindowLong
(
hdlg
,
DWL_USER
);
ci
=
(
ConnInfo
*
)
GetWindowLong
(
hdlg
,
DWL_USER
);
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_D
S
),
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_D
RV
),
hdlg
,
d
s
_optionsProc
,
(
LPARAM
)
ci
);
hdlg
,
d
river
_optionsProc
,
(
LPARAM
)
ci
);
break
;
break
;
}
}
}
}
...
...
src/interfaces/odbc/info.c
View file @
89d6f680
...
@@ -1231,7 +1231,7 @@ PGAPI_Tables(
...
@@ -1231,7 +1231,7 @@ PGAPI_Tables(
}
}
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
tables_query
,
" and nspname like '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
tables_query
,
" and nspname like '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
else
else
my_strcat
(
tables_query
,
" and usename like '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
tables_query
,
" and usename like '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
tables_query
,
" and relname like '%.*s'"
,
szTableName
,
cbTableName
);
my_strcat
(
tables_query
,
" and relname like '%.*s'"
,
szTableName
,
cbTableName
);
...
@@ -1627,7 +1627,7 @@ PGAPI_Columns(
...
@@ -1627,7 +1627,7 @@ PGAPI_Columns(
{
{
my_strcat
(
columns_query
,
" and c.relname = '%.*s'"
,
szTableName
,
cbTableName
);
my_strcat
(
columns_query
,
" and c.relname = '%.*s'"
,
szTableName
,
cbTableName
);
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
columns_query
,
" and u.nspname = '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
columns_query
,
" and u.nspname = '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
else
else
my_strcat
(
columns_query
,
" and u.usename = '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
columns_query
,
" and u.usename = '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
columns_query
,
" and a.attname = '%.*s'"
,
szColumnName
,
cbColumnName
);
my_strcat
(
columns_query
,
" and a.attname = '%.*s'"
,
szColumnName
,
cbColumnName
);
...
@@ -1640,7 +1640,7 @@ PGAPI_Columns(
...
@@ -1640,7 +1640,7 @@ PGAPI_Columns(
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableName
,
cbTableName
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableName
,
cbTableName
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
my_strcat
(
columns_query
,
" and c.relname like '%.*s'"
,
esc_table_name
,
escTbnamelen
);
my_strcat
(
columns_query
,
" and c.relname like '%.*s'"
,
esc_table_name
,
escTbnamelen
);
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
columns_query
,
" and u.nspname like '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
columns_query
,
" and u.nspname like '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
else
else
my_strcat
(
columns_query
,
" and u.usename like '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
columns_query
,
" and u.usename like '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
columns_query
,
" and a.attname like '%.*s'"
,
szColumnName
,
cbColumnName
);
my_strcat
(
columns_query
,
" and a.attname like '%.*s'"
,
szColumnName
,
cbColumnName
);
...
@@ -2130,7 +2130,7 @@ PGAPI_SpecialColumns(
...
@@ -2130,7 +2130,7 @@ PGAPI_SpecialColumns(
my_strcat
(
columns_query
,
" and c.relname = '%.*s'"
,
szTableName
,
cbTableName
);
my_strcat
(
columns_query
,
" and c.relname = '%.*s'"
,
szTableName
,
cbTableName
);
/* SchemaName cannot contain a string search pattern */
/* SchemaName cannot contain a string search pattern */
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
columns_query
,
" and u.nspname = '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
columns_query
,
" and u.nspname = '%.*s'"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
else
else
my_strcat
(
columns_query
,
" and u.usename = '%.*s'"
,
szTableOwner
,
cbTableOwner
);
my_strcat
(
columns_query
,
" and u.usename = '%.*s'"
,
szTableOwner
,
cbTableOwner
);
...
@@ -2377,7 +2377,7 @@ PGAPI_Statistics(
...
@@ -2377,7 +2377,7 @@ PGAPI_Statistics(
}
}
table_qualifier
[
0
]
=
'\0'
;
table_qualifier
[
0
]
=
'\0'
;
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
table_qualifier
,
"%.*s"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
table_qualifier
,
"%.*s"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
/*
/*
* we need to get a list of the field names first, so we can return
* we need to get a list of the field names first, so we can return
...
@@ -2843,7 +2843,7 @@ PGAPI_PrimaryKeys(
...
@@ -2843,7 +2843,7 @@ PGAPI_PrimaryKeys(
}
}
pkscm
[
0
]
=
'\0'
;
pkscm
[
0
]
=
'\0'
;
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
schema_strcat
(
pkscm
,
"%.*s"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
pkscm
,
"%.*s"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
result
=
PGAPI_BindCol
(
htbl_stmt
,
1
,
SQL_C_CHAR
,
result
=
PGAPI_BindCol
(
htbl_stmt
,
1
,
SQL_C_CHAR
,
attname
,
MAX_INFO_STRING
,
&
attname_len
);
attname
,
MAX_INFO_STRING
,
&
attname_len
);
...
@@ -3379,7 +3379,7 @@ char schema_fetched[MAX_SCHEMA_LEN + 1];
...
@@ -3379,7 +3379,7 @@ char schema_fetched[MAX_SCHEMA_LEN + 1];
mylog
(
"%s: entering Foreign Key Case #2"
,
func
);
mylog
(
"%s: entering Foreign Key Case #2"
,
func
);
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
{
{
schema_strcat
(
schema_needed
,
"%.*s"
,
szFkTableOwner
,
cbFkTableOwner
,
szFkTableName
,
cbFkTableName
);
schema_strcat
(
schema_needed
,
"%.*s"
,
szFkTableOwner
,
cbFkTableOwner
,
szFkTableName
,
cbFkTableName
,
conn
);
sprintf
(
tables_query
,
"SELECT pt.tgargs, "
sprintf
(
tables_query
,
"SELECT pt.tgargs, "
" pt.tgnargs, "
" pt.tgnargs, "
" pt.tgdeferrable, "
" pt.tgdeferrable, "
...
@@ -3781,7 +3781,7 @@ if (conn->schema_support)
...
@@ -3781,7 +3781,7 @@ if (conn->schema_support)
{
{
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
{
{
schema_strcat
(
schema_needed
,
"%.*s"
,
szPkTableOwner
,
cbPkTableOwner
,
szPkTableName
,
cbPkTableName
);
schema_strcat
(
schema_needed
,
"%.*s"
,
szPkTableOwner
,
cbPkTableOwner
,
szPkTableName
,
cbPkTableName
,
conn
);
sprintf
(
tables_query
,
"SELECT pt.tgargs, "
sprintf
(
tables_query
,
"SELECT pt.tgargs, "
" pt.tgnargs, "
" pt.tgnargs, "
" pt.tgdeferrable, "
" pt.tgdeferrable, "
...
@@ -4191,7 +4191,7 @@ PGAPI_Procedures(
...
@@ -4191,7 +4191,7 @@ PGAPI_Procedures(
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
{
{
strcat
(
proc_query
,
" where pg_proc.pronamespace = pg_namespace.oid"
);
strcat
(
proc_query
,
" where pg_proc.pronamespace = pg_namespace.oid"
);
schema_strcat
(
proc_query
,
" and nspname like '%.*s'"
,
szProcOwner
,
cbProcOwner
,
szProcName
,
cbProcName
);
schema_strcat
(
proc_query
,
" and nspname like '%.*s'"
,
szProcOwner
,
cbProcOwner
,
szProcName
,
cbProcName
,
conn
);
my_strcat
(
proc_query
,
" and proname like '%.*s'"
,
szProcName
,
cbProcName
);
my_strcat
(
proc_query
,
" and proname like '%.*s'"
,
szProcName
,
cbProcName
);
}
}
else
else
...
@@ -4330,7 +4330,7 @@ PGAPI_TablePrivileges(
...
@@ -4330,7 +4330,7 @@ PGAPI_TablePrivileges(
{
{
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
{
{
schema_strcat
(
proc_query
,
" nspname = '%.*s' and"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
);
schema_strcat
(
proc_query
,
" nspname = '%.*s' and"
,
szTableOwner
,
cbTableOwner
,
szTableName
,
cbTableName
,
conn
);
}
}
my_strcat
(
proc_query
,
" relname = '%.*s' and"
,
szTableName
,
cbTableName
);
my_strcat
(
proc_query
,
" relname = '%.*s' and"
,
szTableName
,
cbTableName
);
}
}
...
@@ -4342,7 +4342,7 @@ PGAPI_TablePrivileges(
...
@@ -4342,7 +4342,7 @@ PGAPI_TablePrivileges(
if
(
conn
->
schema_support
)
if
(
conn
->
schema_support
)
{
{
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableOwner
,
cbTableOwner
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableOwner
,
cbTableOwner
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
schema_strcat
(
proc_query
,
" nspname like '%.*s' and"
,
esc_table_name
,
escTbnamelen
,
szTableName
,
cbTableName
);
schema_strcat
(
proc_query
,
" nspname like '%.*s' and"
,
esc_table_name
,
escTbnamelen
,
szTableName
,
cbTableName
,
conn
);
}
}
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableName
,
cbTableName
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
escTbnamelen
=
reallyEscapeCatalogEscapes
(
szTableName
,
cbTableName
,
esc_table_name
,
sizeof
(
esc_table_name
),
conn
->
ccsc
);
my_strcat
(
proc_query
,
" relname like '%.*s' and"
,
esc_table_name
,
escTbnamelen
);
my_strcat
(
proc_query
,
" relname like '%.*s' and"
,
esc_table_name
,
escTbnamelen
);
...
...
src/interfaces/odbc/info30.c
View file @
89d6f680
...
@@ -46,13 +46,13 @@ PGAPI_GetInfo30(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue,
...
@@ -46,13 +46,13 @@ PGAPI_GetInfo30(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue,
break
;
break
;
case
SQL_KEYSET_CURSOR_ATTRIBUTES1
:
case
SQL_KEYSET_CURSOR_ATTRIBUTES1
:
len
=
4
;
len
=
4
;
value
=
0
;
value
=
SQL_CA1_NEXT
|
SQL_CA1_ABSOLUTE
if
(
ci
->
updatable_cursors
||
ci
->
drivers
.
lie
)
value
|=
(
SQL_CA1_NEXT
|
SQL_CA1_ABSOLUTE
|
SQL_CA1_RELATIVE
|
SQL_CA1_BOOKMARK
|
SQL_CA1_RELATIVE
|
SQL_CA1_BOOKMARK
|
SQL_CA1_LOCK_NO_CHANGE
|
SQL_CA1_POS_POSITION
|
SQL_CA1_LOCK_NO_CHANGE
|
SQL_CA1_POS_POSITION
|
SQL_CA1_POS_UPDATE
|
SQL_CA1_POS_DELETE
|
SQL_CA1_POS_REFRESH
;
|
SQL_CA1_POS_REFRESH
|
SQL_CA1_BULK_ADD
if
(
ci
->
updatable_cursors
||
ci
->
drivers
.
lie
)
value
|=
(
SQL_CA1_POS_UPDATE
|
SQL_CA1_POS_DELETE
|
SQL_CA1_BULK_ADD
|
SQL_CA1_BULK_UPDATE_BY_BOOKMARK
|
SQL_CA1_BULK_UPDATE_BY_BOOKMARK
|
SQL_CA1_BULK_DELETE_BY_BOOKMARK
|
SQL_CA1_BULK_DELETE_BY_BOOKMARK
|
SQL_CA1_BULK_FETCH_BY_BOOKMARK
|
SQL_CA1_BULK_FETCH_BY_BOOKMARK
...
@@ -67,7 +67,7 @@ PGAPI_GetInfo30(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue,
...
@@ -67,7 +67,7 @@ PGAPI_GetInfo30(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue,
break
;
break
;
case
SQL_KEYSET_CURSOR_ATTRIBUTES2
:
case
SQL_KEYSET_CURSOR_ATTRIBUTES2
:
len
=
4
;
len
=
4
;
value
=
0
;
value
=
SQL_CA2_READ_ONLY_CONCURRENCY
;
if
(
ci
->
updatable_cursors
||
ci
->
drivers
.
lie
)
if
(
ci
->
updatable_cursors
||
ci
->
drivers
.
lie
)
value
|=
(
SQL_CA2_OPT_ROWVER_CONCURRENCY
value
|=
(
SQL_CA2_OPT_ROWVER_CONCURRENCY
/*| SQL_CA2_CRC_APPROXIMATE*/
/*| SQL_CA2_CRC_APPROXIMATE*/
...
...
src/interfaces/odbc/misc.c
View file @
89d6f680
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <process.h>
/* Byron: is this where Windows keeps def.
#include <process.h>
/* Byron: is this where Windows keeps def.
* of getpid ? */
* of getpid ? */
#endif
#endif
#include "connection.h"
extern
GLOBAL_VALUES
globals
;
extern
GLOBAL_VALUES
globals
;
void
generate_filename
(
const
char
*
,
const
char
*
,
char
*
);
void
generate_filename
(
const
char
*
,
const
char
*
,
char
*
);
...
@@ -280,17 +281,17 @@ my_strcat(char *buf, const char *fmt, const char *s, int len)
...
@@ -280,17 +281,17 @@ my_strcat(char *buf, const char *fmt, const char *s, int len)
}
}
char
*
char
*
schema_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
,
const
char
*
tbname
,
int
tbnmlen
)
schema_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
,
const
char
*
tbname
,
int
tbnmlen
,
ConnectionClass
*
conn
)
{
{
if
(
!
s
||
0
==
len
)
if
(
!
s
||
0
==
len
)
{
{
/*
/*
*
I can find no appropriate way to find
*
Note that this driver assumes the implicit schema is
*
the CURRENT SCHEMA. If you are lucky
*
the CURRENT_SCHEMA() though it doesn't worth the
*
you can get expected result
.
*
naming
.
*/
*/
/***** if (
tbname && (tbnmlen > 0 || tbnmlen == SQL_NTS))
if
(
conn
->
schema_support
&&
tbname
&&
(
tbnmlen
>
0
||
tbnmlen
==
SQL_NTS
))
return my_strcat(buf, fmt,
"public", 6); *****/
return
my_strcat
(
buf
,
fmt
,
CC_get_current_schema
(
conn
),
SQL_NTS
);
return
NULL
;
return
NULL
;
}
}
return
my_strcat
(
buf
,
fmt
,
s
,
len
);
return
my_strcat
(
buf
,
fmt
,
s
,
len
);
...
...
src/interfaces/odbc/misc.h
View file @
89d6f680
...
@@ -92,7 +92,7 @@ char *trim(char *string);
...
@@ -92,7 +92,7 @@ char *trim(char *string);
char
*
make_string
(
const
char
*
s
,
int
len
,
char
*
buf
);
char
*
make_string
(
const
char
*
s
,
int
len
,
char
*
buf
);
char
*
my_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
);
char
*
my_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
);
char
*
schema_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
,
char
*
schema_strcat
(
char
*
buf
,
const
char
*
fmt
,
const
char
*
s
,
int
len
,
const
char
*
,
int
);
const
char
*
,
int
,
ConnectionClass
*
conn
);
/* #define GET_SCHEMA_NAME(nspname) (stricmp(nspname, "public") ? nspname : "") */
/* #define GET_SCHEMA_NAME(nspname) (stricmp(nspname, "public") ? nspname : "") */
#define GET_SCHEMA_NAME(nspname) (nspname)
#define GET_SCHEMA_NAME(nspname) (nspname)
...
...
src/interfaces/odbc/multibyte.c
View file @
89d6f680
...
@@ -351,6 +351,44 @@ CC_lookup_characterset(ConnectionClass *self)
...
@@ -351,6 +351,44 @@ CC_lookup_characterset(ConnectionClass *self)
encstr
=
CC_lookup_cs_new
(
self
);
encstr
=
CC_lookup_cs_new
(
self
);
if
(
self
->
client_encoding
)
if
(
self
->
client_encoding
)
free
(
self
->
client_encoding
);
free
(
self
->
client_encoding
);
#ifndef UNICODE_SUPPORT
#ifdef WIN32
else
{
const
char
*
wenc
=
NULL
;
switch
(
GetACP
())
{
case
932
:
wenc
=
"SJIS"
;
break
;
case
936
:
wenc
=
"GBK"
;
break
;
case
949
:
wenc
=
"UHC"
;
break
;
case
950
:
wenc
=
"BIG5"
;
break
;
}
if
(
wenc
&&
stricmp
(
encstr
,
wenc
))
{
QResultClass
*
res
;
char
query
[
64
];
sprintf
(
query
,
"set client_encoding to '%s'"
,
wenc
);
res
=
CC_send_query
(
self
,
query
,
NULL
,
CLEAR_RESULT_ON_ABORT
);
if
(
res
)
{
self
->
client_encoding
=
strdup
(
wenc
);
QR_Destructor
(
res
);
free
(
encstr
);
return
;
}
}
}
#endif
/* WIN32 */
#endif
/* UNICODE_SUPPORT */
if
(
encstr
)
if
(
encstr
)
{
{
self
->
client_encoding
=
encstr
;
self
->
client_encoding
=
encstr
;
...
...
src/interfaces/odbc/parse.c
View file @
89d6f680
...
@@ -597,11 +597,9 @@ parse_statement(StatementClass *stmt)
...
@@ -597,11 +597,9 @@ parse_statement(StatementClass *stmt)
if
(
fi
[
ifld
]
->
dot
[
0
])
if
(
fi
[
ifld
]
->
dot
[
0
])
{
{
strcat
(
fi
[
ifld
]
->
dot
,
"."
);
fi
[
ifld
]
->
schema
=
strdup
(
fi
[
ifld
]
->
dot
);
strcat
(
fi
[
ifld
]
->
dot
,
fi
[
ifld
]
->
name
);
}
}
else
strcpy
(
fi
[
ifld
]
->
dot
,
fi
[
ifld
]
->
name
);
strcpy
(
fi
[
ifld
]
->
dot
,
fi
[
ifld
]
->
name
);
strcpy
(
fi
[
ifld
]
->
name
,
token
);
strcpy
(
fi
[
ifld
]
->
name
,
token
);
if
(
delim
==
','
)
if
(
delim
==
','
)
...
@@ -820,17 +818,49 @@ parse_statement(StatementClass *stmt)
...
@@ -820,17 +818,49 @@ parse_statement(StatementClass *stmt)
fi
[
i
]
->
length
=
fi
[
i
]
->
column_size
;
fi
[
i
]
->
length
=
fi
[
i
]
->
column_size
;
continue
;
continue
;
}
}
/* field name contains the schema name */
else
if
(
fi
[
i
]
->
schema
)
{
int
matchidx
=
-
1
;
for
(
k
=
0
;
k
<
stmt
->
ntab
;
k
++
)
{
if
(
!
stricmp
(
ti
[
k
]
->
name
,
fi
[
i
]
->
dot
))
{
if
(
!
stricmp
(
ti
[
k
]
->
schema
,
fi
[
i
]
->
schema
))
{
fi
[
i
]
->
ti
=
ti
[
k
];
break
;
}
else
if
(
!
ti
[
k
]
->
schema
[
0
])
{
if
(
matchidx
<
0
)
matchidx
=
k
;
else
{
stmt
->
parse_status
=
STMT_PARSE_FATAL
;
stmt
->
errornumber
=
STMT_EXEC_ERROR
;
stmt
->
errormsg
=
"duplicated Table name"
;
stmt
->
updatable
=
FALSE
;
return
FALSE
;
}
}
}
}
if
(
matchidx
>=
0
)
fi
[
i
]
->
ti
=
ti
[
matchidx
];
}
/* it's a dot, resolve to table or alias */
/* it's a dot, resolve to table or alias */
else
if
(
fi
[
i
]
->
dot
[
0
])
else
if
(
fi
[
i
]
->
dot
[
0
])
{
{
for
(
k
=
0
;
k
<
stmt
->
ntab
;
k
++
)
for
(
k
=
0
;
k
<
stmt
->
ntab
;
k
++
)
{
{
if
(
!
stricmp
(
ti
[
k
]
->
name
,
fi
[
i
]
->
dot
))
if
(
!
stricmp
(
ti
[
k
]
->
alias
,
fi
[
i
]
->
dot
))
{
{
fi
[
i
]
->
ti
=
ti
[
k
];
fi
[
i
]
->
ti
=
ti
[
k
];
break
;
break
;
}
}
else
if
(
!
stricmp
(
ti
[
k
]
->
alias
,
fi
[
i
]
->
dot
))
else
if
(
!
stricmp
(
ti
[
k
]
->
name
,
fi
[
i
]
->
dot
))
{
{
fi
[
i
]
->
ti
=
ti
[
k
];
fi
[
i
]
->
ti
=
ti
[
k
];
break
;
break
;
...
@@ -869,13 +899,84 @@ parse_statement(StatementClass *stmt)
...
@@ -869,13 +899,84 @@ parse_statement(StatementClass *stmt)
/* See if already got it */
/* See if already got it */
char
found
=
FALSE
;
char
found
=
FALSE
;
for
(
k
=
0
;
k
<
conn
->
ntables
;
k
++
)
if
(
conn
->
schema_support
)
{
{
if
(
!
stricmp
(
conn
->
col_info
[
k
]
->
name
,
ti
[
i
]
->
name
)
)
if
(
!
ti
[
i
]
->
schema
[
0
]
)
{
{
mylog
(
"FOUND col_info table='%s'
\n
"
,
ti
[
i
]
->
name
);
const
char
*
curschema
=
CC_get_current_schema
(
conn
);
found
=
TRUE
;
/*
break
;
* Though current_schema() doesn't have
* much sense in PostgreSQL, we first
* check the current_schema() when no
* explicit schema name was specified.
*/
for
(
k
=
0
;
k
<
conn
->
ntables
;
k
++
)
{
if
(
!
stricmp
(
conn
->
col_info
[
k
]
->
name
,
ti
[
i
]
->
name
)
&&
!
stricmp
(
conn
->
col_info
[
k
]
->
schema
,
curschema
))
{
mylog
(
"FOUND col_info table='%s' current schema='%s'
\n
"
,
ti
[
i
]
->
name
,
curschema
);
found
=
TRUE
;
strcpy
(
ti
[
i
]
->
schema
,
curschema
);
break
;
}
}
if
(
!
found
)
{
QResultClass
*
res
;
BOOL
tblFound
=
FALSE
;
/*
* We also have to check as follows.
*/
sprintf
(
token
,
"select nspname from pg_namespace n, pg_class c"
" where c.relnamespace=n.oid and c.oid='%s'::regclass"
,
ti
[
i
]
->
name
);
res
=
CC_send_query
(
conn
,
token
,
NULL
,
CLEAR_RESULT_ON_ABORT
);
if
(
res
)
{
if
(
QR_get_num_total_tuples
(
res
)
==
1
)
{
tblFound
=
TRUE
;
strcpy
(
ti
[
i
]
->
schema
,
QR_get_value_backend_row
(
res
,
0
,
0
));
}
QR_Destructor
(
res
);
}
else
CC_abort
(
conn
);
if
(
!
tblFound
)
{
stmt
->
parse_status
=
STMT_PARSE_FATAL
;
stmt
->
errornumber
=
STMT_EXEC_ERROR
;
stmt
->
errormsg
=
"Table not found"
;
stmt
->
updatable
=
FALSE
;
return
FALSE
;
}
}
}
if
(
!
found
&&
ti
[
i
]
->
schema
[
0
])
{
for
(
k
=
0
;
k
<
conn
->
ntables
;
k
++
)
{
if
(
!
stricmp
(
conn
->
col_info
[
k
]
->
name
,
ti
[
i
]
->
name
)
&&
!
stricmp
(
conn
->
col_info
[
k
]
->
schema
,
ti
[
i
]
->
schema
))
{
mylog
(
"FOUND col_info table='%s' schema='%s'
\n
"
,
ti
[
i
]
->
name
,
ti
[
i
]
->
schema
);
found
=
TRUE
;
break
;
}
}
}
}
else
{
for
(
k
=
0
;
k
<
conn
->
ntables
;
k
++
)
{
if
(
!
stricmp
(
conn
->
col_info
[
k
]
->
name
,
ti
[
i
]
->
name
))
{
mylog
(
"FOUND col_info table='%s'
\n
"
,
ti
[
i
]
->
name
);
found
=
TRUE
;
break
;
}
}
}
}
}
...
@@ -895,37 +996,6 @@ parse_statement(StatementClass *stmt)
...
@@ -895,37 +996,6 @@ parse_statement(StatementClass *stmt)
col_stmt
=
(
StatementClass
*
)
hcol_stmt
;
col_stmt
=
(
StatementClass
*
)
hcol_stmt
;
col_stmt
->
internal
=
TRUE
;
col_stmt
->
internal
=
TRUE
;
if
(
!
ti
[
i
]
->
schema
[
0
]
&&
conn
->
schema_support
)
{
QResultClass
*
res
;
BOOL
tblFound
=
FALSE
;
/* Unfortunately CURRENT_SCHEMA doesn't exist
* in PostgreSQL and we have to check as follows.
*/
sprintf
(
token
,
"select nspname from pg_namespace n, pg_class c"
" where c.relnamespace=n.oid and c.oid='%s'::regclass"
,
ti
[
i
]
->
name
);
res
=
CC_send_query
(
conn
,
token
,
NULL
,
CLEAR_RESULT_ON_ABORT
);
if
(
res
)
{
if
(
QR_get_num_total_tuples
(
res
)
==
1
)
{
tblFound
=
TRUE
;
strcpy
(
ti
[
i
]
->
schema
,
QR_get_value_backend_row
(
res
,
0
,
0
));
}
QR_Destructor
(
res
);
}
else
CC_abort
(
conn
);
if
(
!
tblFound
)
{
stmt
->
parse_status
=
STMT_PARSE_FATAL
;
stmt
->
errornumber
=
STMT_EXEC_ERROR
;
stmt
->
errormsg
=
"Table not found"
;
stmt
->
updatable
=
FALSE
;
return
FALSE
;
}
}
result
=
PGAPI_Columns
(
hcol_stmt
,
""
,
0
,
ti
[
i
]
->
schema
,
result
=
PGAPI_Columns
(
hcol_stmt
,
""
,
0
,
ti
[
i
]
->
schema
,
SQL_NTS
,
ti
[
i
]
->
name
,
SQL_NTS
,
""
,
0
,
PODBC_NOT_SEARCH_PATTERN
);
SQL_NTS
,
ti
[
i
]
->
name
,
SQL_NTS
,
""
,
0
,
PODBC_NOT_SEARCH_PATTERN
);
...
@@ -957,6 +1027,10 @@ parse_statement(StatementClass *stmt)
...
@@ -957,6 +1027,10 @@ parse_statement(StatementClass *stmt)
* Store the table name and the SQLColumns result
* Store the table name and the SQLColumns result
* structure
* structure
*/
*/
if
(
ti
[
i
]
->
schema
[
0
])
conn
->
col_info
[
conn
->
ntables
]
->
schema
=
strdup
(
ti
[
i
]
->
schema
);
else
conn
->
col_info
[
conn
->
ntables
]
->
schema
=
NULL
;
strcpy
(
conn
->
col_info
[
conn
->
ntables
]
->
name
,
ti
[
i
]
->
name
);
strcpy
(
conn
->
col_info
[
conn
->
ntables
]
->
name
,
ti
[
i
]
->
name
);
conn
->
col_info
[
conn
->
ntables
]
->
result
=
SC_get_Curres
(
col_stmt
);
conn
->
col_info
[
conn
->
ntables
]
->
result
=
SC_get_Curres
(
col_stmt
);
...
...
src/interfaces/odbc/pgtypes.c
View file @
89d6f680
...
@@ -287,6 +287,8 @@ pgtype_to_concise_type(StatementClass *stmt, Int4 type)
...
@@ -287,6 +287,8 @@ pgtype_to_concise_type(StatementClass *stmt, Int4 type)
/* Change this to SQL_BIGINT for ODBC v3 bjm 2001-01-23 */
/* Change this to SQL_BIGINT for ODBC v3 bjm 2001-01-23 */
case
PG_TYPE_INT8
:
case
PG_TYPE_INT8
:
if
(
ci
->
int8_as
!=
0
)
return
ci
->
int8_as
;
if
(
conn
->
ms_jet
)
if
(
conn
->
ms_jet
)
return
SQL_NUMERIC
;
/* maybe a little better than SQL_VARCHAR */
return
SQL_NUMERIC
;
/* maybe a little better than SQL_VARCHAR */
#if (ODBCVER >= 0x0300)
#if (ODBCVER >= 0x0300)
...
@@ -625,7 +627,8 @@ getCharColumnSize(StatementClass *stmt, Int4 type, int col, int handle_unknown_s
...
@@ -625,7 +627,8 @@ getCharColumnSize(StatementClass *stmt, Int4 type, int col, int handle_unknown_s
maxsize
;
maxsize
;
QResultClass
*
result
;
QResultClass
*
result
;
ColumnInfoClass
*
flds
;
ColumnInfoClass
*
flds
;
ConnInfo
*
ci
=
&
(
SC_get_conn
(
stmt
)
->
connInfo
);
ConnectionClass
*
conn
=
SC_get_conn
(
stmt
);
ConnInfo
*
ci
=
&
(
conn
->
connInfo
);
mylog
(
"getCharColumnSize: type=%d, col=%d, unknown = %d
\n
"
,
type
,
col
,
handle_unknown_size_as
);
mylog
(
"getCharColumnSize: type=%d, col=%d, unknown = %d
\n
"
,
type
,
col
,
handle_unknown_size_as
);
...
@@ -684,8 +687,24 @@ getCharColumnSize(StatementClass *stmt, Int4 type, int col, int handle_unknown_s
...
@@ -684,8 +687,24 @@ getCharColumnSize(StatementClass *stmt, Int4 type, int col, int handle_unknown_s
p
=
QR_get_display_size
(
result
,
col
);
/* longest */
p
=
QR_get_display_size
(
result
,
col
);
/* longest */
attlen
=
QR_get_atttypmod
(
result
,
col
);
attlen
=
QR_get_atttypmod
(
result
,
col
);
/* Size is unknown -- handle according to parameter */
/* Size is unknown -- handle according to parameter */
if
(
attlen
>=
p
&&
attlen
>
0
)
/* maybe the length is known */
if
(
attlen
>
0
)
/* maybe the length is known */
return
attlen
;
{
if
(
attlen
>=
p
)
return
attlen
;
switch
(
type
)
{
case
PG_TYPE_VARCHAR
:
case
PG_TYPE_BPCHAR
:
if
(
conn
->
unicode
||
conn
->
ms_jet
)
return
attlen
;
#if (ODBCVER >= 0x0300)
#ifdef MULTIBYTE
return
attlen
;
#endif
/* MULTIBYTE */
#endif
/* ODBCVER */
return
p
;
}
}
/* The type is really unknown */
/* The type is really unknown */
if
(
type
==
PG_TYPE_BPCHAR
||
handle_unknown_size_as
==
UNKNOWNS_AS_LONGEST
)
if
(
type
==
PG_TYPE_BPCHAR
||
handle_unknown_size_as
==
UNKNOWNS_AS_LONGEST
)
...
...
src/interfaces/odbc/psqlodbc.h
View file @
89d6f680
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Comments: See "notice.txt" for copyright and license information.
* Comments: See "notice.txt" for copyright and license information.
*
*
* $Id: psqlodbc.h,v 1.6
6 2002/05/22 05:51:03
inoue Exp $
* $Id: psqlodbc.h,v 1.6
7 2002/06/06 04:50:47
inoue Exp $
*
*
*/
*/
...
...
src/interfaces/odbc/psqlodbc.rc
View file @
89d6f680
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/resource.h
View file @
89d6f680
...
@@ -55,6 +55,16 @@
...
@@ -55,6 +55,16 @@
#define DS_LFCONVERSION 1062
#define DS_LFCONVERSION 1062
#define DS_TRUEISMINUS1 1063
#define DS_TRUEISMINUS1 1063
#define DS_UPDATABLECURSORS 1064
#define DS_UPDATABLECURSORS 1064
#define IDNEXTPAGE 1065
#define IDPREVPAGE 1066
#define DS_INT8_AS_DEFAULT 1067
#define DS_INT8_AS_BIGINT 1068
#define DS_INT8_AS_NUMERIC 1069
#define DS_INT8_AS_VARCHAR 1070
#define DS_INT8_AS_DOUBLE 1071
#define DS_INT8_AS_INT4 1072
#define DRV_MSG_LABEL2 1073
#define IDAPPLY 1074
/* Next default values for new objects */
/* Next default values for new objects */
/* */
/* */
...
@@ -62,7 +72,7 @@
...
@@ -62,7 +72,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 10
6
5
#define _APS_NEXT_CONTROL_VALUE 10
7
5
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NEXT_SYMED_VALUE 101
#endif
/* */
#endif
/* */
...
...
src/interfaces/odbc/results.c
View file @
89d6f680
...
@@ -850,7 +850,7 @@ PGAPI_GetData(
...
@@ -850,7 +850,7 @@ PGAPI_GetData(
break
;
break
;
default:
default:
stmt
->
errormsg
=
"Column 0 is not of type SQL_C_BOOKMARK"
;
stmt
->
errormsg
=
"Column 0 is not of type SQL_C_BOOKMARK"
;
inolog
(
"Column 0 is type %d not of type SQL_C_BOOKMARK"
,
fCType
);
inolog
(
"Column 0 is type %d not of type SQL_C_BOOKMARK"
,
fCType
);
stmt
->
errornumber
=
STMT_PROGRAM_TYPE_OUT_OF_RANGE
;
stmt
->
errornumber
=
STMT_PROGRAM_TYPE_OUT_OF_RANGE
;
SC_log_error
(
func
,
""
,
stmt
);
SC_log_error
(
func
,
""
,
stmt
);
return
SQL_ERROR
;
return
SQL_ERROR
;
...
@@ -1720,6 +1720,8 @@ static void UndoRollback(StatementClass *stmt, QResultClass *res)
...
@@ -1720,6 +1720,8 @@ static void UndoRollback(StatementClass *stmt, QResultClass *res)
{
{
if
(
0
!=
(
status
&
CURS_SELF_DELETING
))
if
(
0
!=
(
status
&
CURS_SELF_DELETING
))
DiscardDeleted
(
res
,
index
);
DiscardDeleted
(
res
,
index
);
keyset
[
index
].
blocknum
=
rollback
[
i
].
blocknum
;
keyset
[
index
].
offset
=
rollback
[
i
].
offset
;
if
(
0
!=
(
keyset
[
index
].
status
&
CURS_SELF_UPDATING
))
if
(
0
!=
(
keyset
[
index
].
status
&
CURS_SELF_UPDATING
))
keyset
[
index
].
status
|=
CURS_NEEDS_REREAD
;
keyset
[
index
].
status
|=
CURS_NEEDS_REREAD
;
keyset
[
index
].
status
&=
~
(
CURS_SELF_DELETING
|
CURS_SELF_UPDATING
|
CURS_SELF_ADDING
|
KEYSET_INFO_PUBLIC
);
keyset
[
index
].
status
&=
~
(
CURS_SELF_DELETING
|
CURS_SELF_UPDATING
|
CURS_SELF_ADDING
|
KEYSET_INFO_PUBLIC
);
...
...
src/interfaces/odbc/setup.c
View file @
89d6f680
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include "resource.h"
#include "resource.h"
#include "dlg_specific.h"
#include "dlg_specific.h"
#include "win_setup.h"
#define INTFUNC __stdcall
#define INTFUNC __stdcall
...
@@ -39,28 +40,6 @@ extern HINSTANCE NEAR s_hModule; /* Saved module handle. */
...
@@ -39,28 +40,6 @@ extern HINSTANCE NEAR s_hModule; /* Saved module handle. */
#define MAXDSNAME (32+1)
/* Max data source name length */
#define MAXDSNAME (32+1)
/* Max data source name length */
/* Globals */
/* NOTE: All these are used by the dialog procedures */
typedef
struct
tagSETUPDLG
{
HWND
hwndParent
;
/* Parent window handle */
LPCSTR
lpszDrvr
;
/* Driver description */
ConnInfo
ci
;
char
szDSN
[
MAXDSNAME
];
/* Original data source name */
BOOL
fNewDSN
;
/* New data source flag */
BOOL
fDefault
;
/* Default data source flag */
}
SETUPDLG
,
FAR
*
LPSETUPDLG
;
/* Prototypes */
void
INTFUNC
CenterDialog
(
HWND
hdlg
);
int
CALLBACK
ConfigDlgProc
(
HWND
hdlg
,
UINT
wMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
void
INTFUNC
ParseAttributes
(
LPCSTR
lpszAttributes
,
LPSETUPDLG
lpsetupdlg
);
BOOL
INTFUNC
SetDSNAttributes
(
HWND
hwnd
,
LPSETUPDLG
lpsetupdlg
);
/*--------
/*--------
* ConfigDSN
* ConfigDSN
*
*
...
@@ -217,6 +196,7 @@ ConfigDlgProc(HWND hdlg,
...
@@ -217,6 +196,7 @@ ConfigDlgProc(HWND hdlg,
{
{
LPSETUPDLG
lpsetupdlg
;
LPSETUPDLG
lpsetupdlg
;
ConnInfo
*
ci
;
ConnInfo
*
ci
;
DWORD
cmd
;
switch
(
wMsg
)
switch
(
wMsg
)
{
{
...
@@ -227,6 +207,7 @@ ConfigDlgProc(HWND hdlg,
...
@@ -227,6 +207,7 @@ ConfigDlgProc(HWND hdlg,
/* Hide the driver connect message */
/* Hide the driver connect message */
ShowWindow
(
GetDlgItem
(
hdlg
,
DRV_MSG_LABEL
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hdlg
,
DRV_MSG_LABEL
),
SW_HIDE
);
SetWindowText
(
GetDlgItem
(
hdlg
,
IDOK
),
"Save"
);
SetWindowLong
(
hdlg
,
DWL_USER
,
lParam
);
SetWindowLong
(
hdlg
,
DWL_USER
,
lParam
);
CenterDialog
(
hdlg
);
/* Center dialog */
CenterDialog
(
hdlg
);
/* Center dialog */
...
@@ -260,7 +241,7 @@ ConfigDlgProc(HWND hdlg,
...
@@ -260,7 +241,7 @@ ConfigDlgProc(HWND hdlg,
/* Process buttons */
/* Process buttons */
case
WM_COMMAND
:
case
WM_COMMAND
:
switch
(
GET_WM_COMMAND_ID
(
wParam
,
lParam
))
switch
(
cmd
=
GET_WM_COMMAND_ID
(
wParam
,
lParam
))
{
{
/*
/*
* Ensure the OK button is enabled only when a data
* Ensure the OK button is enabled only when a data
...
@@ -282,6 +263,7 @@ ConfigDlgProc(HWND hdlg,
...
@@ -282,6 +263,7 @@ ConfigDlgProc(HWND hdlg,
/* Accept results */
/* Accept results */
case
IDOK
:
case
IDOK
:
case
IDAPPLY
:
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
/* Retrieve dialog values */
/* Retrieve dialog values */
if
(
!
lpsetupdlg
->
fDefault
)
if
(
!
lpsetupdlg
->
fDefault
)
...
@@ -293,23 +275,24 @@ ConfigDlgProc(HWND hdlg,
...
@@ -293,23 +275,24 @@ ConfigDlgProc(HWND hdlg,
/* Update ODBC.INI */
/* Update ODBC.INI */
SetDSNAttributes
(
hdlg
,
lpsetupdlg
);
SetDSNAttributes
(
hdlg
,
lpsetupdlg
);
if
(
IDAPPLY
==
cmd
)
break
;
/* Return to caller */
/* Return to caller */
case
IDCANCEL
:
case
IDCANCEL
:
EndDialog
(
hdlg
,
wParam
);
EndDialog
(
hdlg
,
wParam
);
return
TRUE
;
return
TRUE
;
case
IDC_D
RIVER
:
case
IDC_D
ATASOURCE
:
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_DRV
),
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_DRV
),
hdlg
,
d
river_options
Proc
,
(
LPARAM
)
&
lpsetupdlg
->
ci
);
hdlg
,
d
s_options1
Proc
,
(
LPARAM
)
&
lpsetupdlg
->
ci
);
return
TRUE
;
return
TRUE
;
case
IDC_D
ATASOURCE
:
case
IDC_D
RIVER
:
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
lpsetupdlg
=
(
LPSETUPDLG
)
GetWindowLong
(
hdlg
,
DWL_USER
);
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_D
S
),
DialogBoxParam
(
s_hModule
,
MAKEINTRESOURCE
(
DLG_OPTIONS_D
RV
),
hdlg
,
d
s
_optionsProc
,
(
LPARAM
)
&
lpsetupdlg
->
ci
);
hdlg
,
d
river
_optionsProc
,
(
LPARAM
)
&
lpsetupdlg
->
ci
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -415,6 +398,7 @@ SetDSNAttributes(HWND hwndParent, LPSETUPDLG lpsetupdlg)
...
@@ -415,6 +398,7 @@ SetDSNAttributes(HWND hwndParent, LPSETUPDLG lpsetupdlg)
}
}
/* Update ODBC.INI */
/* Update ODBC.INI */
writeDriverCommoninfo
(
&
lpsetupdlg
->
ci
);
writeDSNinfo
(
&
lpsetupdlg
->
ci
);
writeDSNinfo
(
&
lpsetupdlg
->
ci
);
/* If the data source name has changed, remove the old name */
/* If the data source name has changed, remove the old name */
...
...
src/interfaces/odbc/statement.c
View file @
89d6f680
...
@@ -337,8 +337,14 @@ void IRDFields_free(IRDFields * self)
...
@@ -337,8 +337,14 @@ void IRDFields_free(IRDFields * self)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
(
int
)
self
->
nfields
;
i
++
)
for
(
i
=
0
;
i
<
(
int
)
self
->
nfields
;
i
++
)
{
if
(
self
->
fi
[
i
])
if
(
self
->
fi
[
i
])
{
if
(
self
->
fi
[
i
]
->
schema
)
free
(
self
->
fi
[
i
]
->
schema
);
free
(
self
->
fi
[
i
]);
free
(
self
->
fi
[
i
]);
}
}
free
(
self
->
fi
);
free
(
self
->
fi
);
self
->
fi
=
NULL
;
self
->
fi
=
NULL
;
}
}
...
...
src/interfaces/odbc/win32.mak
View file @
89d6f680
...
@@ -63,6 +63,7 @@ CLEAN :
...
@@ -63,6 +63,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -90,6 +91,7 @@ CLEAN :
...
@@ -90,6 +91,7 @@ CLEAN :
-@erase
"$(OUTDIR)\psqlodbc.dll"
-@erase
"$(OUTDIR)\psqlodbc.dll"
-@erase
"$(OUTDIR)\psqlodbc.exp"
-@erase
"$(OUTDIR)\psqlodbc.exp"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -148,6 +150,7 @@ LINK32_OBJS= \
...
@@ -148,6 +150,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -196,6 +199,7 @@ CLEAN :
...
@@ -196,6 +199,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -226,6 +230,7 @@ CLEAN :
...
@@ -226,6 +230,7 @@ CLEAN :
-@erase
"$(OUTDIR)\psqlodbc.ilk"
-@erase
"$(OUTDIR)\psqlodbc.ilk"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.pdb"
-@erase
"$(OUTDIR)\psqlodbc.pdb"
-@erase
"$(OUTDIR)\psqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -284,6 +289,7 @@ LINK32_OBJS= \
...
@@ -284,6 +289,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -347,6 +353,12 @@ SOURCE=dlg_specific.c
...
@@ -347,6 +353,12 @@ SOURCE=dlg_specific.c
$(CPP)
$(CPP_PROJ)
$(SOURCE)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
dlg_wingui.c
"$(INTDIR)\dlg_wingui.obj"
:
$(SOURCE)
"$(INTDIR)"
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
drvconn.c
SOURCE
=
drvconn.c
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
...
...
src/interfaces/odbc/win32_30.mak
View file @
89d6f680
#
#
# File: win32_30.mak
# File: win32_30.mak
#
#
...
@@ -63,6 +62,7 @@ CLEAN :
...
@@ -63,6 +62,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -93,6 +93,7 @@ CLEAN :
...
@@ -93,6 +93,7 @@ CLEAN :
-@erase
"$(OUTDIR)\psqlodbc30.dll"
-@erase
"$(OUTDIR)\psqlodbc30.dll"
-@erase
"$(OUTDIR)\psqlodbc.exp"
-@erase
"$(OUTDIR)\psqlodbc.exp"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -151,6 +152,7 @@ LINK32_OBJS= \
...
@@ -151,6 +152,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -202,6 +204,7 @@ CLEAN :
...
@@ -202,6 +204,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -235,6 +238,7 @@ CLEAN :
...
@@ -235,6 +238,7 @@ CLEAN :
-@erase
"$(OUTDIR)\psqlodbc.ilk"
-@erase
"$(OUTDIR)\psqlodbc.ilk"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.lib"
-@erase
"$(OUTDIR)\psqlodbc.pdb"
-@erase
"$(OUTDIR)\psqlodbc.pdb"
-@erase
"$(OUTDIR)\psqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -293,6 +297,7 @@ LINK32_OBJS= \
...
@@ -293,6 +297,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -359,6 +364,12 @@ SOURCE=dlg_specific.c
...
@@ -359,6 +364,12 @@ SOURCE=dlg_specific.c
$(CPP)
$(CPP_PROJ)
$(SOURCE)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
dlg_wingui.c
"$(INTDIR)\dlg_wingui.obj"
:
$(SOURCE)
"$(INTDIR)"
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
drvconn.c
SOURCE
=
drvconn.c
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
...
...
src/interfaces/odbc/win32_30w.mak
View file @
89d6f680
...
@@ -54,6 +54,7 @@ CLEAN :
...
@@ -54,6 +54,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -85,6 +86,7 @@ CLEAN :
...
@@ -85,6 +86,7 @@ CLEAN :
-
@erase
"
$(OUTDIR)
\p
sqlodbc30w.dll"
-
@erase
"
$(OUTDIR)
\p
sqlodbc30w.dll"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.exp"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.exp"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.lib"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.lib"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -139,6 +141,7 @@ LINK32_OBJS= \
...
@@ -139,6 +141,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -183,6 +186,7 @@ CLEAN :
...
@@ -183,6 +186,7 @@ CLEAN :
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onnection.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\c
onvert.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_specific.obj"
-
@erase
"
$(INTDIR)
\d
lg_wingui.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\d
rvconn.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
nviron.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
-
@erase
"
$(INTDIR)
\e
xecute.obj"
...
@@ -217,6 +221,7 @@ CLEAN :
...
@@ -217,6 +221,7 @@ CLEAN :
-
@erase
"
$(OUTDIR)
\p
sqlodbc.ilk"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.ilk"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.lib"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.lib"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.pdb"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.pdb"
-
@erase
"
$(OUTDIR)
\p
sqlodbc.pch"
"$(OUTDIR)"
:
"$(OUTDIR)"
:
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
...
@@ -271,6 +276,7 @@ LINK32_OBJS= \
...
@@ -271,6 +276,7 @@ LINK32_OBJS= \
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onnection.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\c
onvert.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_specific.obj"
\
"
$(INTDIR)
\d
lg_wingui.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\d
rvconn.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
nviron.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
"
$(INTDIR)
\e
xecute.obj"
\
...
@@ -338,6 +344,12 @@ SOURCE=dlg_specific.c
...
@@ -338,6 +344,12 @@ SOURCE=dlg_specific.c
$(CPP)
$(CPP_PROJ)
$(SOURCE)
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
dlg_wingui.c
"$(INTDIR)\dlg_wingui.obj"
:
$(SOURCE)
"$(INTDIR)"
$(CPP)
$(CPP_PROJ)
$(SOURCE)
SOURCE
=
drvconn.c
SOURCE
=
drvconn.c
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
"$(INTDIR)\drvconn.obj"
:
$(SOURCE)
"$(INTDIR)"
...
...
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