Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVNQt-0004A5-Fi for pgsql-general@arkaria.postgresql.org; Sat, 30 Dec 2017 20:08:39 +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 1eVNQs-0000En-CP for pgsql-general@arkaria.postgresql.org; Sat, 30 Dec 2017 20:08:38 +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 1eVNQs-0000Ee-25 for pgsql-general@lists.postgresql.org; Sat, 30 Dec 2017 20:08:38 +0000 Received: from virtual1.potentialtech.com ([69.25.178.43] helo=mail.potentialtech.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eVNQp-0007xW-1x for pgsql-general@lists.postgresql.org; Sat, 30 Dec 2017 20:08:36 +0000 Received: from beezelbub (c-67-171-70-156.hsd1.pa.comcast.net [67.171.70.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id 29B3D24BEB7; Sat, 30 Dec 2017 15:08:33 -0500 (EST) Date: Sat, 30 Dec 2017 15:08:32 -0500 From: PT To: GPT Cc: Karsten Hilbert , pgsql-general@lists.postgresql.org Subject: Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute" Message-Id: <20171230150832.b1f208884afa1ccc14e715c7@potentialtech.com> In-Reply-To: References: <20171230192310.GF5732@hermes.hilbert.loc> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, 30 Dec 2017 20:33:28 +0100 GPT wrote: > Please visit the following link: > > https://stackoverflow.com/q/48028501/8895614 > > but thing may go further/deeper than it seems. Adding columns to a built-in system table is liable to cause all sorts of problems in the future: when you upgrade, migrate to another server, need to create dev environments, etc. The view technique described in the stackunderwhelm article seems like a good solution to me. Maybe if you could explain why you are against it? > Krds > > On 12/30/17, Karsten Hilbert wrote: > > On Sat, Dec 30, 2017 at 08:17:34PM +0100, GPT wrote: > > > >> I would like to add an extra boolean attribute to table columns, > >> something like NULL. Unfortunately Pg does not support such a feature: > >> > >> ADD ATTRIBUTE TYPE TO COLUMN > >> ; > > ... > >> I have already been suggested to use VIEW or dynamic SQL but I am > >> looking something different. > > > > Can you explain why ? > > > > One thing that comes to mind is complex user types. > > > > Or columns of type table. > > > > Karsten > > -- > > GPG key ID E4071346 @ eu.pool.sks-keyservers.net > > E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 > > > > > -- Bill Moran