Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fp1b2-0007MH-9c for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 01:24:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fp1b0-0002Pr-Mo for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 01:24: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.89) (envelope-from ) id 1fp1ay-0002Pk-Tr for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 01:24:34 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fp1au-00088d-NU for pgsql-general@postgresql.org; Mon, 13 Aug 2018 01:24:31 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CF70B21949; Sun, 12 Aug 2018 21:24:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 12 Aug 2018 21:24:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.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=fm3; bh=FJgM4HEXZdLR1daxFiCMftBZqQ2FQ e3r2/J5cC4GSwI=; b=wH2tVceB58lu2KGgquad654CIVLRGWpziijmngHIVSe4N K+YmGIyh0iYJNs2NknWv+o1AnjnxELa6tPMzfxAyCtrXYg4kGqd+icyXMecFU3or mKj/DoZp15u8GyLXUfn8MGve/+ROHlTEOOK34cNFVAu45+5KN2zv2m0oUhPZ2QJr j2h+7VQkmDtMS4+16/HjtRqcaT2fjVPHyHhYJItrYMKLcwVISPDmxyOOdxj9cgcv zOOWg2zS5zZHW7YF3k4hFHb0Jm7X+TrOA6dlIYWGNVPbLTFI7QNq59M//wzPi0Oh YIFTsQ9n0GWaZCj4ch/k1JjLs2gVx+RScIq0hZv/A== 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=fm3; bh=FJgM4H EXZdLR1daxFiCMftBZqQ2FQe3r2/J5cC4GSwI=; b=A6P2FgD9V1c5JpIfqptU+L +EUSbGDf4uVCzzdh+OFZxkQLEVAsG1QcAUrVl8d+7t5CgOfdVT52/tgbN9G1/j1S e6/HySLUJ7/qaz/nf5aUrU39ID7mzLvj2Yy1OjmAC9Ggv58CdcwZPiogHFEsi7Pi GhdpOKmveAu/NgwfF99VqCWbT6ON+ZhTq/p2bIpJ68cX4oOH5ESvQFvuxkbKTvcL 3ymXJipZInSobDdsg07K7p60H5FKcQv19pbiguj8RFsmn6m8lanD3gsFiGBcqmFl OlCJl3n4+eeYC31U/ukByCP5PBg6nPs314bmwhLluJRG4AXdeDMNa753vm8/iMaA == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 31463E465F; Sun, 12 Aug 2018 21:24:27 -0400 (EDT) Subject: Re: Safe operations? To: Samuel Williams , pgsql-general References: From: Adrian Klaver Message-ID: Date: Sun, 12 Aug 2018 18:24:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/12/2018 05:41 PM, Samuel Williams wrote: > I wish the documentation would include performance details, i.e. this > operation is O(N) or O(1) relative to the number of rows. > > I found renaming a table was okay. > > How about renaming a column? Is it O(1) or proportional to the amount of > data? > > Is there any documentation about this? https://www.postgresql.org/docs/10/static/sql-altertable.html "RENAME The RENAME forms change the name of a table (or an index, sequence, view, materialized view, or foreign table), the name of an individual column in a table, or the name of a constraint of the table. There is no effect on the stored data. " > > Thanks > Samuel -- Adrian Klaver adrian.klaver@aklaver.com