Re: nextval parameter is not clear - Mailing list pgsql-docs

From Kirk Wolak
Subject Re: nextval parameter is not clear
Date
Msg-id CACLU5mShHGjroH=Cp_k6i-T+357_Fhxahc5NqpNPoJnN56GyFg@mail.gmail.com
Whole thread Raw
In response to Re: nextval parameter is not clear  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: nextval parameter is not clear  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs
On Thu, Nov 24, 2022 at 5:33 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Thu, 2022-11-24 at 02:41 -0500, Kirk Wolak wrote:
> Alright, as I have the documentation build working, and a slightly better stylesheet,
> the comments on the last block were not aligned.
> They are fixed now.
>
> Apologies for spamming this in...  My first patch turned into 3 emails... 

That is no problem.

I think the patch is fine.  I like the addition of the "--" comments.
The one think that should be unified is that you include an explicit
cast to "regclass" everywhere, but the pre-existing example does not.

I would omit that cast.  It might confuse beginners (who are probably
satisfied to know that you have to use the sequence name as a string),
and it is explained in the last paragraph of the page anyway.

Yours,
Laurenz Albe

Laurenz, 
  First, thanks for the support..

  It's funny you mention that (with and without ::regclass).  I went both ways on it.  
The reason I did not address it, was that I liked the variety because it sticks out.  
I thought about adding a comment like 
-- while you can omit  the ::regclass casting, it is preferred

  The fact that it is different engages the brain of the reader whose pattern matching 
just got challenged.  It almost begs them to test it out. 

  I think it might deserve a comment, but I would really prefer to keep it in there.

Regards Kirk

pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: nextval parameter is not clear
Next
From: "David G. Johnston"
Date:
Subject: Re: nextval parameter is not clear