Re: Re: Supplements and suggestions and about postgresql sequence setval function in the documents - Mailing list pgsql-docs

From David Rowley
Subject Re: Re: Supplements and suggestions and about postgresql sequence setval function in the documents
Date
Msg-id CAApHDvq-HT2ypS+TW+2BTNgWE6+yaKzBm710bASz=pD_rpmkuw@mail.gmail.com
Whole thread Raw
In response to Re:Re: Supplements and suggestions and about postgresql sequence setval function in the documents  ("yanliang lei" <msdnchina@163.com>)
List pgsql-docs
On Thu, 22 Aug 2024 at 11:41, yanliang lei <msdnchina@163.com> wrote:
> What I want to express is:
>    There is no description in the document that the schema name can be included before the sequence name

I'm not to sure there is any problem here. If you look at the final
paragraph in: https://www.postgresql.org/docs/current/functions-sequence.html
you'll see:

"The sequence to be operated on by a sequence function is specified by
a regclass argument, which is simply the OID of the sequence in the
pg_class system catalog. You do not have to look up the OID by hand,
however, since the regclass data type's input converter will do the
work for you. See Section 8.19 for details."

If you navigate to Section 8.19, you'll see:

"All of the OID alias types for objects that are grouped by namespace
accept schema-qualified names, and will display schema-qualified names
on output if the object would not be found in the current search path
without being qualified. For example, myschema.mytable is acceptable
input for regclass (if there is such a table)."

I don't think it would be a good idea to repeat this information each
time we document a function which has a regclass parameter, (or any
other reg* type). Doing so would bloat the documentation quite a lot.
In any case, if we were to do that, why would we limit it to reg*
types? Could someone come along and argue that we didn't reiterate
what an INT type was each time we document a function with an INT
parameter?

I think once the reader learns what a regclass type is, they'll be
quite irritated if we repeatedly tell them what it is again and again.

David



pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Re: Supplements and suggestions and about postgresql sequence setval function in the documents
Next
From: PG Doc comments form
Date:
Subject: Incorrect option name for meson build