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
7934c93c
Commit
7934c93c
authored
May 16, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This patch fixes a bug which occurs when setObject(1,obj) is called and obj
is of type Object, and is null Dave Cramer
parent
37b006e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
...terfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
+8
-0
src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
...terfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
+8
-0
No files found.
src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
View file @
7934c93c
...
...
@@ -455,6 +455,10 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
*/
public
void
setObject
(
int
parameterIndex
,
Object
x
,
int
targetSqlType
,
int
scale
)
throws
SQLException
{
if
(
x
==
null
){
setNull
(
parameterIndex
,
Types
.
OTHER
);
return
;
}
switch
(
targetSqlType
)
{
case
Types
.
TINYINT
:
...
...
@@ -506,6 +510,10 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
*/
public
void
setObject
(
int
parameterIndex
,
Object
x
)
throws
SQLException
{
if
(
x
==
null
){
setNull
(
parameterIndex
,
Types
.
OTHER
);
return
;
}
if
(
x
instanceof
String
)
setString
(
parameterIndex
,
(
String
)
x
);
else
if
(
x
instanceof
BigDecimal
)
...
...
src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
View file @
7934c93c
...
...
@@ -515,6 +515,10 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
*/
public
void
setObject
(
int
parameterIndex
,
Object
x
,
int
targetSqlType
,
int
scale
)
throws
SQLException
{
if
(
x
==
null
){
setNull
(
parameterIndex
,
Types
.
OTHER
);
return
;
}
switch
(
targetSqlType
)
{
case
Types
.
TINYINT
:
...
...
@@ -566,6 +570,10 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
*/
public
void
setObject
(
int
parameterIndex
,
Object
x
)
throws
SQLException
{
if
(
x
==
null
){
setNull
(
parameterIndex
,
Types
.
OTHER
);
return
;
}
if
(
x
instanceof
String
)
setString
(
parameterIndex
,
(
String
)
x
);
else
if
(
x
instanceof
BigDecimal
)
...
...
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