- publishing free software manuals
PostgreSQL Reference Manual - Volume 2 - Programming Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 408 pages
ISBN 0954612035
RRP £19.95 ($34.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

3.8.5 The decimal type

The decimal type is similar to the numeric type. However it is limited to a maximal precision of 30 significant digits. In contrast to the numeric type which can be created on the heap only, the decimal type can be created either on the stack or on the heap (by means of the functions PGTYPESdecimal_new() and PGTYPESdecimal_free(). There are a lot of other functions that deal with the decimal type in the Informix compatibility mode described in section 3.9 Informix compatibility mode.

The following functions can be used to work with the decimal type and are not only contained in the libcompat library.

Request a pointer to a newly allocated decimal variable.
decimal *PGTYPESdecimal_new(void);
Free a decimal type, release all of its memory.
void PGTYPESdecimal_free(decimal *var);
ISBN 0954612035PostgreSQL Reference Manual - Volume 2 - Programming GuideSee the print edition