Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dR39P-00054F-Rk for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Jun 2017 21:08:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dR39P-0006po-EU for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Jun 2017 21:08:27 +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 1dR38i-0005Zt-Fq for pgsql-bugs@postgresql.org; Fri, 30 Jun 2017 21:07:44 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dR38f-0008Lf-UY for pgsql-bugs@postgresql.org; Fri, 30 Jun 2017 21:07:43 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dR38S-0003oJ-Hm for pgsql-bugs@postgresql.org; Fri, 30 Jun 2017 23:07:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-bugs@postgresql.org From: Thomas Kellerer Subject: Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS Date: Fri, 30 Jun 2017 23:07:27 +0200 Lines: 15 Message-ID: References: <20170626192252.17679.77403@wrigleys.postgresql.org> <92d274cb-ebc2-aac3-0d0d-390c5585a547@2ndquadrant.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <92d274cb-ebc2-aac3-0d0d-390c5585a547@2ndquadrant.com> Content-Language: de-DE X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Peter Eisentraut schrieb am 30.06.2017 um 23:03: > On 6/26/17 15:22, zam6ak@gmail.com wrote: >> -- now try to update >> update tbl1 set name = 'Bobby' where id = 1; >> >> ERROR: column "id" can only be updated to DEFAULT >> DETAIL: Column "id" is an identity column defined as GENERATED ALWAYS. > > This is working as expected. What is the problem? I'd say the problem is, that the id column is NOT updated in that statement, only the name. The identity column is only included in the WHERE clause - it's not changed at all. Surely that is not the way it's meant to be? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs