Re: CREATE TABLE ( .. STORAGE ..)

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: aleksander(at)timescale(dot)com
Cc: boekewurm+postgres(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, teodor(at)sigaev(dot)ru, wjzeng2012(at)gmail(dot)com
Subject: Re: CREATE TABLE ( .. STORAGE ..)
Date: 2022-06-17 02:45:35
Message-ID: 20220617.114535.657035567967998560.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks! I have been annoyed sometimes by the lack of this feature.

At Thu, 16 Jun 2022 16:40:55 +0300, Aleksander Alekseev <aleksander(at)timescale(dot)com> wrote in
> Hi Matthias,
>
> > Apart from this comment on the format of the patch, the result seems solid.
>
> Many thanks.
>
> > When updating a patchset generally we try to keep the patches
> > self-contained, and update patches as opposed to adding incremental
> > patches to the set.
>
> My reasoning was to separate my changes from the ones originally
> proposed by Teodor. After doing `git am` locally a reviewer can see
> them separately, or together with `git diff origin/master`, whatever
> he or she prefers. The committer can choose between committing two
> patches ony by one, or rebasing them to a single commit.
>
> I will avoid the "patch for the patch" practice from now on. Sorry for
> the inconvenience.

0001 contains one tranling whitespace error. (which "git diff --check"
can detect)

The modified doc line gets too long to me. Maybe we should wrap it as
done in other lines of the same page.

I think we should avoid descriptions dead-copied between pages. In
this case, I think we should remove the duplicate part of the
description of ALTER TABLE then replace with something like "See
CREATE TABLE for details".

As the result of copying-in the description, SET-STORAGE and
COMPRESSION in the page of CREATE-TABLE use different articles in the
same context.

> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
> This form sets the storage mode for *a* column.

> COMPRESSION compression_method
> The COMPRESSION clause sets the compression method for *the* column.

FWIW I feel "the" is better here, but anyway we should unify them.


static char GetAttributeCompression(Oid atttypid, char *compression);
+static char GetAttributeStorage(const char *storagemode);

The whitespace after "char" is TAB which differs from SPC used in
neigbouring lines.

In the grammar, COMPRESSION uses ColId, but STORAGE uses name. It
seems to me the STORAGE is correct here, though.. (So, do we need to
fix COMPRESSION syntax?)

This adds support for "ADD COLUMN SET STORAGE" but it is not described
in the doc. COMPRESSION is not described, too. Shouldn't we add the
both this time? Or the fix for COMPRESSION can be a different patch.

Now that we have three column options COMPRESSION, COLLATE and STORGE
which has the strict order in syntax. I wonder it can be relaxed but
it might be too much..

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shiy.fnst@fujitsu.com 2022-06-17 03:05:33 RE: Replica Identity check of partition table on subscriber
Previous Message David Rowley 2022-06-17 02:14:54 Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size