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
cabe9896
Commit
cabe9896
authored
Oct 24, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Here is a patch for DatabaseMetaData to show precision properly. It is
from Mark Lillywhite. I am adding to the patch queue.
parent
04503315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
+13
-2
No files found.
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
View file @
cabe9896
...
...
@@ -13,7 +13,7 @@ import org.postgresql.util.PSQLException;
/**
* This class provides information about the database as a whole.
*
* $Id: DatabaseMetaData.java,v 1.3
8 2001/10/24 04:31:50 barry
Exp $
* $Id: DatabaseMetaData.java,v 1.3
9 2001/10/24 17:44:28 momjian
Exp $
*
* <p>Many of the methods here return lists of information in ResultSets. You
* can use the normal ResultSet methods such as getString and getInt to
...
...
@@ -1999,7 +1999,18 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
}
tuple
[
7
]
=
null
;
// Buffer length
tuple
[
8
]
=
"0"
.
getBytes
();
// Decimal Digits - how to get this?
// Decimal digits = scale
// From the source (see e.g. backend/utils/adt/numeric.c,
// function numeric()) the scale and precision can be calculated
// from the typmod value. mark@plasticsoftware.com.au
if
(
typname
.
equals
(
"numeric"
)
||
typname
.
equals
(
"decimal"
))
{
int
attypmod
=
r
.
getInt
(
8
);
tuple
[
8
]
=
Integer
.
toString
((
attypmod
&
0xffff
)
-
VARHDRSZ
).
getBytes
();
}
else
tuple
[
8
]
=
"0"
.
getBytes
();
tuple
[
9
]
=
"10"
.
getBytes
();
// Num Prec Radix - assume decimal
tuple
[
10
]
=
Integer
.
toString
(
nullFlag
.
equals
(
"f"
)
?
java
.
sql
.
DatabaseMetaData
.
columnNullable
:
...
...
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