diff options
author | Bruce Momjian <bruce@momjian.us> | 2024-03-26 12:27:41 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2024-03-26 12:27:41 -0400 |
commit | e648e77e25708874196326b6e4da30e7717156ab (patch) | |
tree | e2cd421b79ad207b407e3d797bccd9a47b072737 /src/backend/utils/adt/varlena.c | |
parent | 8a92b70c11ba2b5f0d2b2611d9453dd90f618629 (diff) | |
download | postgresql-e648e77e25708874196326b6e4da30e7717156ab.tar.gz postgresql-e648e77e25708874196326b6e4da30e7717156ab.zip |
C comment: mention no doc for negative start of substring(text)
Also add URL to hackers discussion.
Backpatch-through: master
Diffstat (limited to 'src/backend/utils/adt/varlena.c')
-rw-r--r-- | src/backend/utils/adt/varlena.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 8d28dd42ce1..d1b09dedfd4 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -891,8 +891,9 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified) int32 E; /* end position */ /* - * SQL99 says S can be zero or negative, but we still must fetch from the - * start of the string. + * SQL99 says S can be zero or negative (which we don't document), but we + * still must fetch from the start of the string. + * https://www.postgresql.org/message-id/170905442373.643.11536838320909376197%40wrigleys.postgresql.org */ S1 = Max(S, 1); |