File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/interfaces/jdbc/org/postgresql/jdbc1 Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 13
13
import org .postgresql .util .PGbytea ;
14
14
import org .postgresql .util .PSQLException ;
15
15
16
- /* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.6 2002/09/06 21:23:06 momjian Exp $
16
+ /* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.7 2002/10/19 22:10:36 barry Exp $
17
17
* This class defines methods of the jdbc1 specification. This class is
18
18
* extended by org.postgresql.jdbc2.AbstractJdbc2ResultSet which adds the jdbc2
19
19
* methods. The real ResultSet class (for jdbc1) is org.postgresql.jdbc1.Jdbc1ResultSet
@@ -646,6 +646,10 @@ public String getFixedString(int col) throws SQLException
646
646
if (wasNullFlag )
647
647
return null ;
648
648
649
+ // if we don't have at least 2 characters it can't be money.
650
+ if (s .length () < 2 )
651
+ return s ;
652
+
649
653
// Handle Money
650
654
if (s .charAt (0 ) == '(' )
651
655
{
@@ -655,6 +659,10 @@ public String getFixedString(int col) throws SQLException
655
659
{
656
660
s = s .substring (1 );
657
661
}
662
+ else if (s .charAt (0 ) == '-' && s .charAt (1 ) == '$' )
663
+ {
664
+ s = "-" + s .substring (2 );
665
+ }
658
666
659
667
return s ;
660
668
}
You can’t perform that action at this time.
0 commit comments