Repository navigation
update string function docs and add a concat page - #7718
Merged
Merged
Conversation
Add a page for concat(), which had none. Replace grep's stale NOTE about glob patterns with how its patterns match today, and document join's optional separator, position's SQL syntax and 1-based result, and substring's defaults and negative start.
mccanne
approved these changes
Nov 24, 2026
Collaborator
|
Contributor
Author
|
Thanks @mccanne! Based on your comment, I'll merge this as is, since it matches what
|
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the second PR from the pass over the function docs (after #7714), checking each Strings page against what
superdoes on currentmain.concat: new page. The function was added in Add concat function, drop "+" for string concatenation #6486 but never got one. The||page now links to it.grep: added the missing comma in the synopsis. The NOTE still described glob patterns, so it now says what a pattern does today: one that can match only one fixed string (e.g., one with no regular expression metacharacters) is a case-insensitive substring search, as in a keyword search, and any other regular expression is case-sensitive unless it starts with(?i). Added an example of each.join: the separator is optional (join(["a","b"])is"ab"). Updated the synopsis and added an example.position: said that the synopsis'sposition(sub IN s)form is SQL syntax that works in pipe queries too, and that the result is 1-based whatever theindex_basepragma is set to. Added examples of the SQL form and of0for not found.substring: said that at least one ofFROMandFORis required, what each defaults to, and that a negative start counts back from the end, with an example. Also fixed an example title.Two questions for @mccanne before this merges:
grepbehavior in the new NOTE intended? grep still seems to be doing case insensitive substring searches #6200 asked this after simplify regexp/grep syntax #6115 said thatgrepnow uses only regular expressions. If it is, this PR documents it and grep still seems to be doing case insensitive substring searches #6200 can be closed. If not, I'll drop the NOTE's first sentence and the new example, and we can discuss changing howgrephandles these patterns. Related: when the pattern isn't a constant (e.g.,grep(p, this)withpfrom the input), it's always a case-insensitive substring search, even with metacharacters, so apof"foo|baz"doesn't match"baz". The page avoids this by not mentioning computed patterns, but let me know if you think we should address it.positionobey theindex_basepragma?substring(Make substring obey pragma index_base #6351) and slices do, so with the default 0-based setting,substring(s FROM position(s, 'bar'))on"foobar"gives"ar". The page now sayspositionis always 1-based, as it is today. I'm planning a small follow-on PR anyway to makepositioncount characters instead of bytes (position("éébar", "bar")is 5, where Postgres and DuckDB give 3), so if the answer is yes, that PR can make this change too and update the page.