| От | Florian G. Pflug |
|---|---|
| Тема | Re: Native type for storing fractions (e.g 1/3)? |
| Дата | |
| Msg-id | 45F9A86B.30509@phlo.org обсуждение исходный текст |
| Ответ на | Re: Native type for storing fractions (e.g 1/3)? (Ron Johnson <ron.l.johnson@cox.net>) |
| Ответы |
Re: Native type for storing fractions (e.g 1/3)?
|
| Список | pgsql-general |
Ron Johnson wrote: > CREATE TYPE ty_fraction AS > ( > n SMALLINT, > d SMALLINT > ); You'd need a type for large integers first - otherwise your ty_fraction will be quite limited. I think numeric could be used for that, though I don't know if numeric guarantees that at least the operators +,-,* and modulo return exact results (Don't loose digits). But even if they do, using some existing library for arbitrary sized integers would probably lead to better performance. greetings, Florian Pflug
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера