Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6817467

Browse files
doc: Document error handling in PGTYPESnumeric_to_long
The documentation for PGTYPESnumeric_to_long only mentioned errnobeing set to indicate overflow but the code also sets errno whenunderflow happens.Reported-by: Aidar Imamov <a.imamov@postgrespro.ru>Discussion:https://postgr.es/m/eebf0ad50ad4321d65d2d64dd6b7f17d@postgrespro.ru
1 parentb2d6b4c commit6817467

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎doc/src/sgml/ecpg.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,9 +2390,10 @@ int PGTYPESnumeric_to_long(numeric *nv, long *lp);
23902390
The function converts the numeric value from the variable that
23912391
<literal>nv</literal> points to into the long integer variable that
23922392
<literal>lp</literal> points to. It returns 0 on success and -1 if an error
2393-
occurs, including overflow. On overflow, the global variable
2393+
occurs, including overflow and underflow. On overflow, the global variable
23942394
<literal>errno</literal> will be set to <literal>PGTYPES_NUM_OVERFLOW</literal>
2395-
additionally.
2395+
and on underflow <literal>errno</literal> will be set to
2396+
<literal>PGTYPES_NUM_UNDERFLOW</literal>.
23962397
</para>
23972398
</listitem>
23982399
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp