public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Erik Wienhold <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: [email protected]
Subject: Re: Use uppercase keywords in foreign key tutorial
Date: Fri, 31 Oct 2025 16:03:08 +1300
Message-ID: <CAApHDvoqh_K2KTocwWYrGw5vLubnPnTzd1SvYTTonQ=vUXP7Ug@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAApHDvoLfa2UjGfoGfVL4b=g5VbFgscrLONuC3kKE9=VZeeN=Q@mail.gmail.com>
	<[email protected]>
	<aQE29YG5pY4Cl8ym@nathan>
	<[email protected]>
	<[email protected]>
	<CAApHDvqR+_EU0mxrmS-AieE_8ovqtmnsJSOk-oq-Rdk3JzNWOg@mail.gmail.com>
	<[email protected]>

On Fri, 31 Oct 2025 at 13:53, Erik Wienhold <[email protected]> wrote:
> But I also agree with Tom that keeping a consistent style is impossible
> in the long run.  But it also shows that the docs are still written by
> humans.  As long as we can keep a consistent style within a single
> listing (or even an entire page) I'm satisfied as a reader.

For me, I don't see this as a reason not to try. If we do get things
to a consistent point, then anyone making changes that reference
existing portions of the documentation for inspiration should maintain
consistency. If we're entirely random, then there's no hope for anyone
to figure out what the best practice or perfected casing is.

> Besides that I've fixed a couple of more places that had lowercase
> keywords or were missing some whitespace that I had missed before.

A couple of things.

1) I see you've added a space after "INSERT INTO table" and before the
column list, but not consistently, per:

git grep -E "INSERT INTO \w+\("

2) An identifier casing has been changed here:

-SELECT sub_part, SUM(quantity) as total_quantity
+SELECT sub_part, sum(quantity) AS total_quantity

You could also look at the results of the SQL command that's returned
by the following SQL to see if there's anything else. I do see some
"ROLLUP(", "EXISTS(", "GROUPING(" and "VALUES(" in there. You have
been changing "VALUES(" to "VALUES (", so I assume those ones have
been missed:

select 'git grep -E "\b(' || string_agg(UPPER(word),'|') || ')\("'
from pg_get_keywords();

David





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], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Use uppercase keywords in foreign key tutorial
  In-Reply-To: <CAApHDvoqh_K2KTocwWYrGw5vLubnPnTzd1SvYTTonQ=vUXP7Ug@mail.gmail.com>

* 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