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
263db2e5
Commit
263db2e5
authored
Jul 11, 2002
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make NAMEDATALEN changeable at compile time.
parent
87c96365
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
src/interfaces/odbc/connection.c
src/interfaces/odbc/connection.c
+4
-3
src/interfaces/odbc/connection.h
src/interfaces/odbc/connection.h
+2
-2
src/interfaces/odbc/psqlodbc.h
src/interfaces/odbc/psqlodbc.h
+9
-5
No files found.
src/interfaces/odbc/connection.c
View file @
263db2e5
...
@@ -645,10 +645,11 @@ CC_connect(ConnectionClass *self, char password_req, char *salt_para)
...
@@ -645,10 +645,11 @@ CC_connect(ConnectionClass *self, char password_req, char *salt_para)
ci
->
drivers
.
ksqo
,
ci
->
drivers
.
ksqo
,
ci
->
drivers
.
unique_index
,
ci
->
drivers
.
unique_index
,
ci
->
drivers
.
use_declarefetch
);
ci
->
drivers
.
use_declarefetch
);
qlog
(
" text_as_longvarchar=%d, unknowns_as_longvarchar=%d, bools_as_char=%d
\n
"
,
qlog
(
" text_as_longvarchar=%d, unknowns_as_longvarchar=%d, bools_as_char=%d
NAMEDATALEN=%d
\n
"
,
ci
->
drivers
.
text_as_longvarchar
,
ci
->
drivers
.
text_as_longvarchar
,
ci
->
drivers
.
unknowns_as_longvarchar
,
ci
->
drivers
.
unknowns_as_longvarchar
,
ci
->
drivers
.
bools_as_char
);
ci
->
drivers
.
bools_as_char
,
MAX_TABLE_LEN
);
#ifdef MULTIBYTE
#ifdef MULTIBYTE
encoding
=
check_client_encoding
(
ci
->
conn_settings
);
encoding
=
check_client_encoding
(
ci
->
conn_settings
);
...
@@ -728,7 +729,7 @@ another_version_retry:
...
@@ -728,7 +729,7 @@ another_version_retry:
SOCK_put_int
(
sock
,
htonl
(
4
+
sizeof
(
StartupPacket6_2
)),
4
);
SOCK_put_int
(
sock
,
htonl
(
4
+
sizeof
(
StartupPacket6_2
)),
4
);
sp62
.
authtype
=
htonl
(
NO_AUTHENTICATION
);
sp62
.
authtype
=
htonl
(
NO_AUTHENTICATION
);
strncpy
(
sp62
.
database
,
ci
->
database
,
PATH_SIZE
);
strncpy
(
sp62
.
database
,
ci
->
database
,
PATH_SIZE
);
strncpy
(
sp62
.
user
,
ci
->
username
,
NAMEDATALEN
);
strncpy
(
sp62
.
user
,
ci
->
username
,
USR
NAMEDATALEN
);
SOCK_put_n_char
(
sock
,
(
char
*
)
&
sp62
,
sizeof
(
StartupPacket6_2
));
SOCK_put_n_char
(
sock
,
(
char
*
)
&
sp62
,
sizeof
(
StartupPacket6_2
));
SOCK_flush_output
(
sock
);
SOCK_flush_output
(
sock
);
}
}
...
...
src/interfaces/odbc/connection.h
View file @
263db2e5
...
@@ -94,7 +94,7 @@ typedef enum
...
@@ -94,7 +94,7 @@ typedef enum
#define NO_AUTHENTICATION 7
#define NO_AUTHENTICATION 7
#define PATH_SIZE 64
#define PATH_SIZE 64
#define ARGV_SIZE 64
#define ARGV_SIZE 64
#define
NAMEDATALEN
16
#define
USRNAMEDATALEN
16
typedef
unsigned
int
ProtocolVersion
;
typedef
unsigned
int
ProtocolVersion
;
...
@@ -120,7 +120,7 @@ typedef struct _StartupPacket6_2
...
@@ -120,7 +120,7 @@ typedef struct _StartupPacket6_2
{
{
unsigned
int
authtype
;
unsigned
int
authtype
;
char
database
[
PATH_SIZE
];
char
database
[
PATH_SIZE
];
char
user
[
NAMEDATALEN
];
char
user
[
USR
NAMEDATALEN
];
char
options
[
ARGV_SIZE
];
char
options
[
ARGV_SIZE
];
char
execfile
[
ARGV_SIZE
];
char
execfile
[
ARGV_SIZE
];
char
tty
[
PATH_SIZE
];
char
tty
[
PATH_SIZE
];
...
...
src/interfaces/odbc/psqlodbc.h
View file @
263db2e5
...
@@ -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
8 2002/06/28 02:44:15
inoue Exp $
* $Id: psqlodbc.h,v 1.6
9 2002/07/11 01:52:46
inoue Exp $
*
*
*/
*/
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
#define ODBCVER 0x0250
#define ODBCVER 0x0250
#endif
/* ODBCVER_REP */
#endif
/* ODBCVER_REP */
#ifndef NAMEDATALEN
#define NAMEDATALEN 32
#endif
/* NAMEDATALEN */
#if defined(WIN32) || defined(WITH_UNIXODBC) || defined(WITH_IODBC)
#if defined(WIN32) || defined(WITH_UNIXODBC) || defined(WITH_IODBC)
#include <sql.h>
#include <sql.h>
...
@@ -124,9 +128,9 @@ typedef UInt4 Oid;
...
@@ -124,9 +128,9 @@ typedef UInt4 Oid;
#define BYTELEN 8
#define BYTELEN 8
#define VARHDRSZ sizeof(Int4)
#define VARHDRSZ sizeof(Int4)
#define MAX_SCHEMA_LEN
32
#define MAX_SCHEMA_LEN
NAMEDATALEN
#define MAX_TABLE_LEN
32
#define MAX_TABLE_LEN
NAMEDATALEN
#define MAX_COLUMN_LEN
32
#define MAX_COLUMN_LEN
NAMEDATALEN
#define MAX_CURSOR_LEN 32
#define MAX_CURSOR_LEN 32
/* Registry length limits */
/* Registry length limits */
...
@@ -239,7 +243,7 @@ void logs_on_off(int cnopen, int, int);
...
@@ -239,7 +243,7 @@ void logs_on_off(int cnopen, int, int);
#define TEXT_FIELD_SIZE 8190
/* size of text fields
#define TEXT_FIELD_SIZE 8190
/* size of text fields
* (not including null
* (not including null
* term) */
* term) */
#define NAME_FIELD_SIZE
32
/* size of name fields */
#define NAME_FIELD_SIZE
NAMEDATALEN
/* size of name fields */
#define MAX_VARCHAR_SIZE 254
/* maximum size of a varchar (not
#define MAX_VARCHAR_SIZE 254
/* maximum size of a varchar (not
* including null term) */
* including null term) */
...
...
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