getScale() and getPrecision()

From: "David Esposito" <esposito(at)newnetco(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: getScale() and getPrecision()
Date: 2001-05-02 16:55:20
Message-ID: PEEDKNLDICKECFBNGNLLGEHPCBAA.esposito@newnetco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message David Esposito 2001-05-02 21:53:37 getScale() and getPrecision() patch
Previous Message Ned Wolpert 2001-05-02 16:43:31 Returning oid or primary key