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

Appearance settings

Commit 6817467

Browse filesBrowse files
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
1 parent b2d6b4c commit 6817467
Copy full SHA for 6817467

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎doc/src/sgml/ecpg.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ecpg.sgml
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.