Re: Use uppercase keywords in foreign key tutorial

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Erik Wienhold <ewie(at)ewie(dot)name>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Use uppercase keywords in foreign key tutorial
Date: 2025-10-29 21:24:30
Message-ID: CAApHDvqR+_EU0mxrmS-AieE_8ovqtmnsJSOk-oq-Rdk3JzNWOg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, 30 Oct 2025 at 09:48, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Tue, Oct 28, 2025 at 04:34:45PM -0500, Nathan Bossart wrote:
> >> I noticed the patch also changes some column types to lowercase:
> >> ...
> >> - category_N TEXT
> >> + category_N text
> >>
> >> FWIW I tend to use uppercase for those, too, but I'm not sure there is a
> >> preferred style for the docs.
>
> > Agreed, uppercase is better for type names.
>
> "text" is not a keyword according to either us or the SQL standard.
> I agree that there's some reason to capitalize things that are
> grammar keywords, such as INTEGER or VARCHAR, but it's a big stretch
> to go from that to capitalizing everything that is a type name.
> Would you capitalize user-defined type names?

Going by: git grep -i "\btext\b," we're fairly consistently using
lower case, so FWIW, when I looked, I thought Eric's change made
sense.

How about if Eric just drops the portion of the patch that alters the
casing of the types and leaves all the keyword uppercasing stuff in.
Any objections to that part?

David

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2025-10-29 21:25:43 Re: Use uppercase keywords in foreign key tutorial
Previous Message Tom Lane 2025-10-29 20:48:44 Re: Use uppercase keywords in foreign key tutorial