Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e648e77

Browse files
committed
C comment: mention no doc for negative start of substring(text)
Also add URL to hackers discussion. Backpatch-through: master
1 parent 8a92b70 commit e648e77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/utils/adt/varlena.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,9 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified)
891891
int32 E; /* end position */
892892

893893
/*
894-
* SQL99 says S can be zero or negative, but we still must fetch from the
895-
* start of the string.
894+
* SQL99 says S can be zero or negative (which we don't document), but we
895+
* still must fetch from the start of the string.
896+
* https://www.postgresql.org/message-id/170905442373.643.11536838320909376197%40wrigleys.postgresql.org
896897
*/
897898
S1 = Max(S, 1);
898899

0 commit comments

Comments
 (0)