public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Robert Treat <[email protected]>
Cc: Andreas Karlsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Docs: Distinguish table and index storage parameters in CREATE TABLE
Date: Fri, 3 Apr 2026 20:03:35 -0700
Message-ID: <CAKFQuwaK50p9TbNp2=AvwstzhvjXS+9kvq96v-A5OviUZCLRqw@mail.gmail.com> (raw)
In-Reply-To: <CABV9wwP-A7XhKfJTJ=ryMV2mfQtzDRsQW73K6+ZvFP56s31j3A@mail.gmail.com>
References: <CAKFQuwYe1vf7k+gx_f5ny1mpz_CrhMhaa_NgVb-87_=DHj3JEw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CABV9wwP-A7XhKfJTJ=ryMV2mfQtzDRsQW73K6+ZvFP56s31j3A@mail.gmail.com>

On Friday, April 3, 2026, Robert Treat <[email protected]> wrote:

> On Fri, Apr 3, 2026 at 3:35 PM Andreas Karlsson <[email protected]> wrote:
> > On 4/3/26 9:27 PM, Andreas Karlsson wrote:
> > > On 4/3/26 8:18 PM, David G. Johnston wrote:
> > >> Per the discussion on -general [1] I propose that we stop using the
> > >> generic label storage_parameter on the create table reference page and
> > >> instead set up proper labels for table and index variants.
> > >
>
> It's sort of interesting that no one in the above discussion gave an
> example like:
> create table t (c int, constraint pk primary key (c) with (fillfactor
> = 90)) with (fillfactor = 100);
> and pointing out that where you put the parameter changes what it
> effects, so I'm a little skeptical that this patch would help the
> original discussion, but it certainly wouldn't hurt, so +1 from me.
>

Stretches my skills a bit but if the error message had been: (unrecognized
index storage parameter “autovacuum_enabled”) the syntax placement issue
may have been recognized working under the assumption the author knows
their intent is to modify the table (and vice-versa).

As a quick footgun prevention attempt (not a huge fan though):

Note, specifying a primary key or unique constraint as the final component
of create table makes assigning storage parameters to the wrong object more
likely.
(Added to the with clause section)

David J.


view thread (8+ messages)  latest in thread

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]
  Subject: Re: Docs: Distinguish table and index storage parameters in CREATE TABLE
  In-Reply-To: <CAKFQuwaK50p9TbNp2=AvwstzhvjXS+9kvq96v-A5OviUZCLRqw@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