Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxYey-0000N2-Ea for pgsql-docs@arkaria.postgresql.org; Tue, 22 Nov 2022 19:10:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxYex-0006oY-5r for pgsql-docs@arkaria.postgresql.org; Tue, 22 Nov 2022 19:10:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxYew-0006oP-UR for pgsql-docs@lists.postgresql.org; Tue, 22 Nov 2022 19:10:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxYeq-00040i-No for pgsql-docs@lists.postgresql.org; Tue, 22 Nov 2022 19:10:17 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1oxYep-0062es-Ti; Tue, 22 Nov 2022 14:10:11 -0500 Date: Tue, 22 Nov 2022 14:10:11 -0500 From: Bruce Momjian To: ailjushkin@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: nextval parameter is not clear Message-ID: References: <166608103231.2042183.13992576112735261253@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <166608103231.2042183.13992576112735261253@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Oct 18, 2022 at 08:17:12AM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/14/functions-sequence.html > Description: > > https://www.postgresql.org/docs/14/functions-sequence.html > > I don't see here any hints about how to use this function, and what the > regclass means. > How should I understand that sequence_name should be passed as string in > nextval('sequence_name') ? > > Maybe add some links to other topics or clarify examples for nextval here. Uh, the last sentence in that section says: 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. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson