Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeJnm-0006A1-D2 for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 12:05:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeJnm-00032e-0G for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 12:05:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eeJnl-00032E-LO for pgsql-general@lists.postgresql.org; Wed, 24 Jan 2018 12:05:13 +0000 Received: from mta1.ilger.com ([77.81.238.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eeJne-000266-Nd for pgsql-general@postgresql.org; Wed, 24 Jan 2018 12:05:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mta1.ilger.com (Postfix) with ESMTP id 0D551407D1 for ; Wed, 24 Jan 2018 13:05:05 +0100 (CET) X-Virus-Scanned: amavisd-new at mta1.ilger.com Received: from mta1.ilger.com ([127.0.0.1]) by localhost (mta1.ilger.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UMMrthrgOk8E for ; Wed, 24 Jan 2018 13:05:04 +0100 (CET) Received: from [172.18.4.138] (37-186-245-150.ip271.fastwebnet.it [37.186.245.150]) by mta1.ilger.com (Postfix) with ESMTPSA id E3EB24047A for ; Wed, 24 Jan 2018 13:05:04 +0100 (CET) Subject: Re: PostgreSQL 9.6: view based on sequence References: Cc: PostgreSQL General From: Enrico Pirozzi Message-ID: Date: Wed, 24 Jan 2018 13:05:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk tmp1=# create sequence x; > CREATE SEQUENCE > Time: 69,857 ms > tmp1=# select * from x; > last_value | log_cnt | is_called > ------------+---------+----------- > 1 | 0 | f > (1 row) > > Maybe what you want to do is > > create view v_test_sequence as select nextval( 'test_sequence' ); > > Ciao. Yes but this happens on a 10.x version on a 9.6 version things are differents Ciao Enrico -- Enrico Pirozzi e.pirozzi@nbsgroup.it