diff options
author | Daniel Gustafsson <dgustafsson@postgresql.org> | 2024-03-25 14:18:39 +0100 |
---|---|---|
committer | Daniel Gustafsson <dgustafsson@postgresql.org> | 2024-03-25 14:18:39 +0100 |
commit | 68174679fea2d514e9281fddd826abaccfac5bf7 (patch) | |
tree | 2e48bd4b24f2a219f0eb9ac4c077d96df1f4200f /doc/src | |
parent | b2d6b4c728a282f9bbe9ff4fac02a872bef074dd (diff) | |
download | postgresql-68174679fea2d514e9281fddd826abaccfac5bf7.tar.gz postgresql-68174679fea2d514e9281fddd826abaccfac5bf7.zip |
doc: Document error handling in PGTYPESnumeric_to_long
The documentation for PGTYPESnumeric_to_long only mentioned errno
being set to indicate overflow but the code also sets errno when
underflow happens.
Reported-by: Aidar Imamov <a.imamov@postgrespro.ru>
Discussion: https://postgr.es/m/eebf0ad50ad4321d65d2d64dd6b7f17d@postgrespro.ru
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ecpg.sgml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index ab58729e6ec..43082704a7c 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -2390,9 +2390,10 @@ int PGTYPESnumeric_to_long(numeric *nv, long *lp); The function converts the numeric value from the variable that <literal>nv</literal> points to into the long integer variable that <literal>lp</literal> points to. It returns 0 on success and -1 if an error - occurs, including overflow. On overflow, the global variable + occurs, including overflow and underflow. On overflow, the global variable <literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal> - additionally. + and on underflow <literal>errno</literal> will be set to + <literal>PGTYPES_NUM_UNDERFLOW</literal>. </para> </listitem> </varlistentry> |