Precision is the accuracy of the data type. DECIMAL : max # digits (must be >= Width/Scale) INTERVAL : max # fractional second digits TIME : max # fractional second digits TIMETZ : max # fractional second digits TIMESTAMP : max # fractional second digits TIMESTAMPTZ: max # fra
()
| 1379 | // |
| 1380 | // Precision is always 0 for other types. |
| 1381 | func (t *T) Precision() int32 { |
| 1382 | switch t.InternalType.Family { |
| 1383 | case IntervalFamily, TimestampFamily, TimestampTZFamily, TimeFamily, TimeTZFamily: |
| 1384 | if t.InternalType.Precision == 0 && !t.InternalType.TimePrecisionIsSet { |
| 1385 | return defaultTimePrecision |
| 1386 | } |
| 1387 | } |
| 1388 | return t.InternalType.Precision |
| 1389 | } |
| 1390 | |
| 1391 | // TypeModifier returns the type modifier of the type. This corresponds to the |
| 1392 | // pg_attribute.atttypmod column. atttypmod records type-specific data supplied |
no outgoing calls
no test coverage detected