Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BBY-0000Bu-Ae for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 20:56:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0BBX-00045H-1M for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 20:56:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BBW-00045A-Ny for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 20:56:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BBU-0000Hm-7O for pgsql-general@postgresql.org; Tue, 20 Aug 2019 20:56:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x7KKukxP017272; Tue, 20 Aug 2019 16:56:46 -0400 From: Tom Lane To: "Day, David" cc: Luca Ferrari , "pgsql-general@postgresql.org" Subject: Re: Rename a column if not already renamed.? In-reply-to: References: Comments: In-reply-to "Day, David" message dated "Tue, 20 Aug 2019 19:50:35 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17270.1566334606.1@sss.pgh.pa.us> Date: Tue, 20 Aug 2019 16:56:46 -0400 Message-ID: <17271.1566334606@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Day, David" writes: > The error is something like column already exists and Not sure about the workflow this function is used within, but maybe you need to consider what to do when both the old and new column names exist. Because that sure sounds like what is happening. regards, tom lane