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
40eb5495
Commit
40eb5495
authored
22 years ago
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1) Fix a bug in declare/fetch mode.
2) Suppress some error logs for the request to other drivers.
parent
50b5d4bf
REL_14_STABLE
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
4 deletions
+27
-4
src/interfaces/odbc/environ.c
src/interfaces/odbc/environ.c
+3
-0
src/interfaces/odbc/options.c
src/interfaces/odbc/options.c
+13
-0
src/interfaces/odbc/qresult.h
src/interfaces/odbc/qresult.h
+1
-0
src/interfaces/odbc/results.c
src/interfaces/odbc/results.c
+9
-4
src/interfaces/odbc/statement.h
src/interfaces/odbc/statement.h
+1
-0
No files found.
src/interfaces/odbc/environ.c
View file @
40eb5495
...
...
@@ -281,6 +281,9 @@ PGAPI_StmtError( HSTMT hstmt,
case
STMT_INVALID_OPTION_IDENTIFIER
:
strcpy
(
szSqlState
,
"HY092"
);
break
;
case
STMT_OPTION_NOT_FOR_THE_DRIVER
:
strcpy
(
szSqlState
,
"HYC00"
);
break
;
case
STMT_EXEC_ERROR
:
default:
strcpy
(
szSqlState
,
"S1000"
);
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/options.c
View file @
40eb5495
...
...
@@ -209,6 +209,19 @@ set_statement_option(ConnectionClass *conn,
conn
->
stmtOptions
.
use_bookmarks
=
vParam
;
break
;
case
1227
:
case
1228
:
if
(
stmt
)
{
stmt
->
errornumber
=
STMT_OPTION_NOT_FOR_THE_DRIVER
;
stmt
->
errormsg
=
"The option may be for MS SQL Server(Set)"
;
}
else
if
(
conn
)
{
conn
->
errornumber
=
STMT_OPTION_NOT_FOR_THE_DRIVER
;
conn
->
errormsg
=
"The option may be for MS SQL Server(Set)"
;
}
return
SQL_ERROR
;
default:
{
char
option
[
64
];
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/qresult.h
View file @
40eb5495
...
...
@@ -102,6 +102,7 @@ struct QResultClass_
/* status macros */
#define QR_command_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR))
#define QR_command_maybe_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_FATAL_ERROR))
#define QR_command_nonfatal(self) ( self->status == PGRES_NONFATAL_ERROR)
#define QR_end_tuples(self) ( self->status == PGRES_END_TUPLES)
#define QR_set_status(self, condition) ( self->status = condition )
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/results.c
View file @
40eb5495
...
...
@@ -628,7 +628,7 @@ inolog("COLUMN_NULLABLE=%d\n", value);
break
;
case
SQL_COLUMN_OWNER_NAME
:
/* == SQL_DESC_SCHEMA_NAME */
p
=
""
;
p
=
fi
&&
(
fi
->
ti
)
?
fi
->
ti
->
schema
:
""
;
break
;
case
SQL_COLUMN_PRECISION
:
/* in 2.x */
...
...
@@ -744,6 +744,10 @@ inolog("COLUMN_TYPE=%d\n", value);
value
=
(
fi
&&
!
fi
->
name
[
0
]
&&
!
fi
->
alias
[
0
])
?
SQL_UNNAMED
:
SQL_NAMED
;
break
;
#endif
/* ODBCVER */
case
1212
:
stmt
->
errornumber
=
STMT_OPTION_NOT_FOR_THE_DRIVER
;
stmt
->
errormsg
=
"this request may be for MS SQL Server"
;
return
SQL_ERROR
;
default:
stmt
->
errornumber
=
STMT_INVALID_OPTION_IDENTIFIER
;
stmt
->
errormsg
=
"ColAttribute for this type not implemented yet"
;
...
...
@@ -1293,9 +1297,10 @@ PGAPI_ExtendedFetch(
/* increment the base row in the tuple cache */
QR_set_rowset_size
(
res
,
opts
->
rowset_size
);
/* QR_inc_base(res, stmt->last_fetch_count); */
/* Is inc_base right ? */
res
->
base
=
stmt
->
rowset_start
;
if
(
SC_is_fetchcursor
(
stmt
))
QR_inc_base
(
res
,
stmt
->
last_fetch_count
);
else
res
->
base
=
stmt
->
rowset_start
;
/* Physical Row advancement occurs for each row fetched below */
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/odbc/statement.h
View file @
40eb5495
...
...
@@ -79,6 +79,7 @@ typedef enum
#define STMT_RETURN_NULL_WITHOUT_INDICATOR 29
#define STMT_ERROR_IN_ROW 30
#define STMT_INVALID_DESCRIPTOR_IDENTIFIER 31
#define STMT_OPTION_NOT_FOR_THE_DRIVER 32
/* statement types */
enum
...
...
This diff is collapsed.
Click to expand it.
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