Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eekzu-0001JI-H3 for pgsql-general@arkaria.postgresql.org; Thu, 25 Jan 2018 17:07:34 +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 1eekzu-0007D3-1m for pgsql-general@arkaria.postgresql.org; Thu, 25 Jan 2018 17:07:34 +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 1eekzt-0007Ct-Mo for pgsql-general@lists.postgresql.org; Thu, 25 Jan 2018 17:07:33 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eekzm-0006cl-KI for pgsql-general@postgresql.org; Thu, 25 Jan 2018 17:07:32 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id BE526214C4; Thu, 25 Jan 2018 12:07:25 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Thu, 25 Jan 2018 12:07:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Cm0VUv 9mMT/CSrAEKW75luLVtWUubFGXWvZW5gK2uuM=; b=Y1oA/Xzq4m4y4b+xhIL5fO L28fDKIPcttJcZcEICczEwOYGc17V+KR9X09k2KF+yqHcVPf8r8ll8mPHWx7J92x Iy8cnjrJquqJyR7Z4zYctMdwYX3IPnqBskRnhOjIixS6Ic3BKkCB/pg7kZuK0xR5 I2F8K7dd74U3729LaBx8ErX2oUkQXY6btEIxmIjyVqc7GaU1tdDMi88g4Piv4YDz izO4KCVvSNxB+S3jDkstZe60iOE3TC0oV2UuG0rw1f0MlP1rkiITe0HkWSYjBzgR xfGdUt1xZWxSDbnXdpKpuJw1yj5fE0jDb+AgEk7Ibwr/b/05AQPyL/qsBwVoETGg == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 806C8240B6; Thu, 25 Jan 2018 12:07:25 -0500 (EST) Subject: Re: PostgreSQL 9.6: view based on sequence To: Enrico Pirozzi , pgsql-general@postgresql.org References: From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <0bcc6563-cf37-ec1e-feef-53685f13282c@2ndquadrant.com> Date: Thu, 25 Jan 2018 12:07:25 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/24/18 06:52, Enrico Pirozzi wrote: > 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. There is nothing from with user code using the data type "name". It's probably just not the best choice. But if you create a view over a system table, then you'll get whatever types the system table uses. There is nothing from with that. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services