Re: [GENERAL] Precision of calculated numeric fields

2000-06-06 Thread Tom Lane
Travis Bauer <[EMAIL PROTECTED]> writes: > Is this the mod field of the Field class in JDBC2? Sounds right, but I haven't looked at the JDBC code. > Does -1 alway mean, for > numeric types, that the precision is undefined? Right. In general, -1 is the default typmod if Postgres doesn't have an

Re: [GENERAL] Precision of calculated numeric fields

2000-06-06 Thread Travis Bauer
Is this the mod field of the Field class in JDBC2? Does -1 alway mean, for numeric types, that the precision is undefined? If so, I could patch up the ResultSet class to function properly. I traced through the ResultSet code this morning.

Re: [GENERAL] Precision of calculated numeric fields

2000-06-06 Thread Tom Lane
Travis Bauer <[EMAIL PROTECTED]> writes: > Consider the following: > trbauer=# create table t1 (x numberic(3,2)); > trbauer=# \d t1 > Attribute | Type | Modifier > > X | numeric(3,2) | > trbauer=# create view v1 as select x*2 from t1; > trbauer

[GENERAL] Precision of calculated numeric fields

2000-06-06 Thread Travis Bauer
Consider the following: trbauer=# create table t1 (x numberic(3,2)); trbauer=# \d t1 Attribute | Type | Modifier X | numeric(3,2) | trbauer=# create view v1 as select x*2 from t1; trbauer=# \d v1 Attribute | Type | Modifier ---