aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/bool.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-10-19 11:31:05 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-10-19 11:31:05 -0400
commit8483a54b7da709c6f381f2dd06085a67ecf669ba (patch)
tree518c7c1632cc9a5bcd5397a0a23cb1225743df3a /src/backend/utils/adt/bool.c
parent5147ab1dd34ad81c169c85fa3c7d11a782a1555b (diff)
downloadpostgresql-8483a54b7da709c6f381f2dd06085a67ecf669ba.tar.gz
postgresql-8483a54b7da709c6f381f2dd06085a67ecf669ba.zip
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
Diffstat (limited to 'src/backend/utils/adt/bool.c')
-rw-r--r--src/backend/utils/adt/bool.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/utils/adt/bool.c b/src/backend/utils/adt/bool.c
index cc4bd550354..16ae96a8ff4 100644
--- a/src/backend/utils/adt/bool.c
+++ b/src/backend/utils/adt/bool.c
@@ -35,6 +35,7 @@ parse_bool(const char *value, bool *result)
bool
parse_bool_with_len(const char *value, size_t len, bool *result)
{
+ /* Check the most-used possibilities first. */
switch (*value)
{
case 't':
@@ -119,12 +120,7 @@ parse_bool_with_len(const char *value, size_t len, bool *result)
*****************************************************************************/
/*
- * boolin - converts "t" or "f" to 1 or 0
- *
- * Check explicitly for "true/false" and TRUE/FALSE, 1/0, YES/NO, ON/OFF.
- * Reject other values.
- *
- * In the switch statement, check the most-used possibilities first.
+ * boolin - input function for type boolean
*/
Datum
boolin(PG_FUNCTION_ARGS)