public inbox for [email protected]  
help / color / mirror / Atom feed
From: Euler Taveira <[email protected]>
To: Erik Wienhold <[email protected]>
To: [email protected]
Subject: Re: Use uppercase keywords in foreign key tutorial
Date: Mon, 20 Oct 2025 22:37:20 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Thu, Oct 16, 2025, at 5:37 AM, Erik Wienhold wrote:
> While browsing the docs I saw that the foreign key tutorial [1] uses
> some lowercase keywords which are inconsistent with the rest of the
> docs.  The attached patch fixes that.  Should be pushed to all stable
> branches.
>

Register your patch in the next CF [1] so it won't be forgotten.

These are not the only places that SQL keywords use lowercase. There are
various cases (I searched for 'primary key') in dml.sgml, logicaldecoding.sgml,
plpgsql.sgml, sepgsql.sgml, and textsearch.sgml that you should address as part
of your proposal. I don't think there is an easy way to collect all cases. I
also checked the most common keywords and I found a few lowercase cases. The
SQL commands are usually inside programlisting tag so I tried the following
command (to find the occurrence in the first line):

cd doc/srg/sgml
grep -r -A 1 '<programlisting' * | grep -E 'create |alter |drop |select |insert into|update |delete '

(This command was an easy way to show there are other cases. It is not intended
to be a starting point to collect all cases.)

Of course, there are other cases too. For example, "between" in config.sgml is
lowercase.

<programlisting>
CREATE TABLE parent(key integer, ...);
CREATE TABLE child1000(check (key between 1000 and 1999)) INHERITS(parent);
CREATE TABLE child2000(check (key between 2000 and 2999)) INHERITS(parent);
...
SELECT * FROM parent WHERE key = 2400;
</programlisting>


[1] https://commitfest.postgresql.org/56/


-- 
Euler Taveira
EDB   https://www.enterprisedb.com/





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Use uppercase keywords in foreign key tutorial
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox