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

Lines changed: 3 additions & 2 deletions
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)
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