Re: Use uppercase keywords in foreign key tutorial
On 2025-11-10 04:15 +0100, jian he wrote: > On Thu, Nov 6, 2025 at 11:06 AM David Rowley wrote: > > > > I reviewed this and double checked you left "uPDaTE" in [1]. Found no > > issues, so pushed. > > > > in doc/src/sgml/func/func-matching.sgml > > > substring(string similar > pattern escape > escape-character) > > or using the now obsolete SQL:1999 syntax: > > substring(string from > pattern for > escape-character) > > or as a plain three-argument function: > > substring(string, > pattern, > escape-character) > > > key word: "similar", "escape", "from", "for" within the above synopsis > section need uppercase too? Thanks, good catch. Not surprised that I've missed those because it already took me a couple of rounds to find everything that's in the previous patch. Here's another patch. -- Erik Wienhold diff --git a/doc/src/sgml/func/func-matching.sgml b/doc/src/sgml/func/func-matching.sgml index 91a0b7ca0de..f466860ddb0 100644 --- a/doc/src/sgml/func/func-matching.sgml +++ b/doc/src/sgml/func/func-matching.sgml @@ -369,11 +369,11 @@ regular expression pattern. The function can be written according to standard SQL syntax: -substring(string similar pattern escape escape-character) +substring(string SIMILAR pattern ESCAPE escape-character) or using the now obsolete SQL:1999 syntax: -substring(string from pattern for escape-character) +substring(string FROM pattern FOR escape-character) or as a plain three-argument function:
Re: Use uppercase keywords in foreign key tutorial
On Mon, 10 Nov 2025 at 16:40, Erik Wienhold wrote:
> > in doc/src/sgml/func/func-matching.sgml
> > key word: "similar", "escape", "from", "for" within the above synopsis
> > section need uppercase too?
>
> Thanks, good catch. Not surprised that I've missed those because it
> already took me a couple of rounds to find everything that's in the
> previous patch. Here's another patch.
I've pushed this after doing a manual scan the command that the
following outputs:
select 'git grep -E "\b(' || string_agg(word,'|') || ')\("' from
pg_get_keywords();
I didn't see any other ones that are all lowercase. I also tried with
initcap(word). I didn't go as far as writing a regex that searched for
other mixed case but not all upper case.
David
Re: Use uppercase keywords in foreign key tutorial
On Thu, Nov 6, 2025 at 11:06 AM David Rowley wrote: > > I reviewed this and double checked you left "uPDaTE" in [1]. Found no > issues, so pushed. > hi. in doc/src/sgml/func/func-matching.sgml substring(string similar pattern escape escape-character) or using the now obsolete SQL:1999 syntax: substring(string from pattern for escape-character) or as a plain three-argument function: substring(string, pattern, escape-character) key word: "similar", "escape", "from", "for" within the above synopsis section need uppercase too? -- jian https://www.enterprisedb.com/
