getScale() and getPrecision() - Mailing list pgsql-jdbc

From David Esposito
Subject getScale() and getPrecision()
Date
Msg-id PEEDKNLDICKECFBNGNLLGEHPCBAA.esposito@newnetco.com
Whole thread Raw
Responses getScale() and getPrecision() patch  ("David Esposito" <esposito@newnetco.com>)
List pgsql-jdbc
Is there a reason that getScale() and getPrecision() both return zero for
NUMERIC fields? It seems like this shouldn't be the case. In the example
fields below (generated by doing a \d on the table), it would seem like the
getScale and Precision methods should return the numbers contained in the
parentheses.

Or at least that's how the docs seem to read and that's how Oracle does it
too ... ;)

 catalog_item_id                | numeric(11,0)            | not null
 catalog_item_category_id       | numeric(11,0)            | not null
 catalog_item_manufacturer_no   | character varying(20)    |
 catalog_item_manufacturer_url  | character varying(50)    |
 catalog_item_retail_price      | numeric(11,2)            | not null
 catalog_item_member_price      | numeric(11,2)            | not null
 catalog_item_sellable          | numeric(1,0)             | not null

-Dave


pgsql-jdbc by date:

Previous
From: Ned Wolpert
Date:
Subject: Returning oid or primary key
Next
From: "David Esposito"
Date:
Subject: getScale() and getPrecision() patch