Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd650a6f

Browse files
author
Barry Lind
committed
updated patch from Mark Lillywhite per Tom Lane's comments: subtract VARHDRSZ first then and with 0xffff
1 parentd80d4ba commitd650a6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* This class provides information about the database as a whole.
1515
*
16-
* $Id: DatabaseMetaData.java,v 1.40 2001/10/25 05:59:59 momjian Exp $
16+
* $Id: DatabaseMetaData.java,v 1.41 2001/10/30 05:09:51 barry Exp $
1717
*
1818
* <p>Many of the methods here return lists of information in ResultSets. You
1919
* can use the normal ResultSet methods such as getString and getInt to
@@ -2014,12 +2014,12 @@ public java.sql.ResultSet getColumns(String catalog, String schemaPattern, Strin
20142014
// Decimal digits = scale
20152015
// From the source (see e.g. backend/utils/adt/numeric.c,
20162016
// function numeric()) the scale and precision can be calculated
2017-
// from the typmod value. mark@plasticsoftware.com.au
2017+
// from the typmod value.
20182018
if (typname.equals("numeric") ||typname.equals("decimal"))
20192019
{
20202020
intattypmod =r.getInt(8);
20212021
tuple[8] =
2022-
Integer.toString((attypmod&0xffff) -VARHDRSZ).getBytes();
2022+
Integer.toString((attypmod-VARHDRSZ) &0xffff).getBytes();
20232023
}
20242024
else
20252025
tuple[8] ="0".getBytes();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp