Skip to content

Commit 8483a54

Browse files
committed
Doc: modernize comment for boolin().
Most of the behavior described by this comment was moved to parse_bool_with_len() some time ago. Move what's still valuable there too, and drop the rest. Peter Smith Discussion: https://postgr.es/m/CAHut+PtMJURKp=U8Z=Ktp0zV40sEb1f-iEk9FvY2GQe+5ZBnwg@mail.gmail.com
1 parent 5147ab1 commit 8483a54

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/backend/utils/adt/bool.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ parse_bool(const char *value, bool *result)
3535
bool
3636
parse_bool_with_len(const char *value, size_t len, bool *result)
3737
{
38+
/* Check the most-used possibilities first. */
3839
switch (*value)
3940
{
4041
case 't':
@@ -119,12 +120,7 @@ parse_bool_with_len(const char *value, size_t len, bool *result)
119120
*****************************************************************************/
120121

121122
/*
122-
* boolin - converts "t" or "f" to 1 or 0
123-
*
124-
* Check explicitly for "true/false" and TRUE/FALSE, 1/0, YES/NO, ON/OFF.
125-
* Reject other values.
126-
*
127-
* In the switch statement, check the most-used possibilities first.
123+
* boolin - input function for type boolean
128124
*/
129125
Datum
130126
boolin(PG_FUNCTION_ARGS)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy