Re: Working with fixed-point calculations in C
От | Tom Lane |
---|---|
Тема | Re: Working with fixed-point calculations in C |
Дата | |
Msg-id | 3607050.1638934898@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Working with fixed-point calculations in C (Oskar Stenberg <oskar_stenberg@outlook.com>) |
Ответы |
Re: Working with fixed-point calculations in C
RE: Working with fixed-point calculations in C |
Список | pgsql-general |
Oskar Stenberg <oskar_stenberg@outlook.com> writes: > I need to make some fixed-point calculations inside the C code that I'm > developing as an extension to PostgreSQL. I was reading a bit, and if I > understood the datatype NUMBER correctly, it seems to be just what I'm > looking for, a fixed-point datatype. (I couldn't actually find any > thing in the documentation that specifically mentions that it is a > fixed point datatype. But it seems to work the same. So I might be > wrong here and if so please tell me) I think what you are looking for is NUMERIC. (The type name NUMBER is an Oracle-ism, I believe. I'm not sure how closely that corresponds to our NUMERIC.) > Link to the documentation: > https://www.postgresql.org/docs/current/xfunc-c.html#XFUNC-C-TYPE-TABLE Hmm, that table seems a bit incomplete/out of date. While it's not really meant to cover every type, surely it should mention bigint, numeric, and timestamptz ... regards, tom lane
В списке pgsql-general по дате отправления: