Re: Use uppercase keywords in foreign key tutorial - Mailing list pgsql-docs

From Euler Taveira
Subject Re: Use uppercase keywords in foreign key tutorial
Date
Msg-id a5034028-3f97-4157-8fd2-6eb552ffaab8@app.fastmail.com
Whole thread Raw
In response to Use uppercase keywords in foreign key tutorial  (Erik Wienhold <ewie@ewie.name>)
List pgsql-docs
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/



pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Next
From: Oleg
Date:
Subject: Re: Documentation improvement patch