data set combination of integer and decimal/numeric returns wrong result type

From: the6campbells <the6campbells(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: data set combination of integer and decimal/numeric returns wrong result type
Date: 2012-09-25 01:33:00
Message-ID: CAFEjsq4oeM25e=7Tn1X2Fe2RLMsDBqp7h9iU6Fu9nxd+ibXEng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

integer
union
decimal/numeric (7,2)

select tint.cint from tint union select tdec.cdec from tdec

no precision is returned as expected etc
display size is odd
http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getPrecision(int)

ColumnIndexgetColumnNamegetColumnTypeNamegetPrecisiongetScaleisNullable
getTableNamegetSchemaName getCatalogNamegetColumnClassName
getColumnDisplaySizegetColumnLabelgetColumnTypeisAutoIncrement
isCaseSensitiveisCurrencyisDefinitelyWritable isReadOnlyisSearchableisSigned
isWritable 1cintnumeric002 java.math.BigDecimal131089cint2falsefalsefalse
false falsetruetruetrue

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2012-09-25 03:17:27 Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
Previous Message the6campbells 2012-09-25 01:26:17 Re: data type of projected item in a union not correct