Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeJbH-0005VL-MH for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 11:52:19 +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 1eeJbH-0006L5-93 for pgsql-general@arkaria.postgresql.org; Wed, 24 Jan 2018 11:52:19 +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 1eeJbG-0006Kv-UC for pgsql-general@lists.postgresql.org; Wed, 24 Jan 2018 11:52:19 +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 1eeJbD-0001rC-3h for pgsql-general@postgresql.org; Wed, 24 Jan 2018 11:52:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mta1.ilger.com (Postfix) with ESMTP id 91FE0410FF for ; Wed, 24 Jan 2018 12:52:11 +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 KnCDfa7ZN06x for ; Wed, 24 Jan 2018 12:52:11 +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 72A92407C9 for ; Wed, 24 Jan 2018 12:52:11 +0100 (CET) From: Enrico Pirozzi To: pgsql-general@postgresql.org Subject: PostgreSQL 9.6: view based on sequence Message-ID: Date: Wed, 24 Jan 2018 12:52:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I was doing a test on a 9.6 and I've seen a strange thing if I run create sequence test_sequence; create view v_test_sequence as select * from test_sequence; PostgreSQL creates a view based on the sequence and the strange thing is that, among the various fields that are created in the view, there is a field named sequence_name with datatype name. I've seen in the docs https://www.postgresql.org/docs/9.6/static/datatype-character.html and the datatype name should be reserved only for structures internal of PG. Does anyone help me? Enrico -- Enrico Pirozzi e.pirozzi@nbsgroup.it