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 1hHByO-0000Bu-E3 for pgsql-general@arkaria.postgresql.org; Thu, 18 Apr 2019 18:41:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hHByN-0006gG-3Q for pgsql-general@arkaria.postgresql.org; Thu, 18 Apr 2019 18:41:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHByM-0006dl-Eh for pgsql-general@lists.postgresql.org; Thu, 18 Apr 2019 18:41:22 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHByI-0005Te-VZ for pgsql-general@lists.postgresql.org; Thu, 18 Apr 2019 18:41:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 10E6229273; Thu, 18 Apr 2019 14:41:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 18 Apr 2019 14:41:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=m Fg8W2jvPau9TH9ulR9seZ7Lyys5ur/7NIb5kkstDz4=; b=Q95oYz17UujBt18pf y8Ad90KiKwA+s5RgvzKaHGaYjW+CL35Q31m0xMkke+4F4AU7Jp8sBraClhIGkX/d KIAN6OEQc2nck9onP6pYdFQatDqm2t7MkQXJuiIL91yTOvCi/AwpX0hounKs8pvt hydboYaW6KAuMcKSEJiw5T5rMlALpvfxCB0lQvY+65iW52POZjS5dr7nymDAcAqh CGbFkWvGneqk/hUCKabdT746R+Z5W4vUp141TwY/sK+hHuGa31FVBKqi4D1Rlu/t rLHHO/X80ojj+L5Xceb5uBcxYLFsmD3ZVjeK54MnJgbofGqNbFtRVkl+GnnJBT23 nbngw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=mFg8W2jvPau9TH9ulR9seZ7Lyys5ur/7NIb5kkstD z4=; b=J6NK6GB3282wV/CTsmpm7ULnMF9S1nlHmUxOq+ikbyiCwoPJS41QfliTK mapp8LQZnt+za3rSPulQDd7Q4JOsMnFvaERQM5kvpLbkzPUENbqt0DqMYNZ4FFd3 GDqGgz8qEbcGFaflN9WaJS32Jvbvymo5061+VC5uhhFAqtxUqogSCb8yOa+YxJ14 sYQ2QsVB1c2XHPOkvGJC0HBAW+eEBhJhyqqQdgFd/7+ZqjlypTpGQTnf7w2v2B7x k3Mp/C8GbUKwZZJG2l7gmXE9PGb/5iGgEBuarmdDLMb0Kz2+CMu5CS0wSHUE0tSx Xc1F9Oouw1nGJJT9FOOFxvRvYy3+w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrfeehgdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecukfhppeejuddrvdduvddrudehtddrvddtvdenucfrrghrrghmpehmrghilhhfrhho mheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvg hrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id E8D82103D0; Thu, 18 Apr 2019 14:41:16 -0400 (EDT) Subject: Re: SQL query To: Ravi Krishna , Vikas Sharma Cc: pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: Date: Thu, 18 Apr 2019 11:41:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.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 4/18/19 11:36 AM, Ravi Krishna wrote: > Not able to produce this with PG 11.1 > > If col1 is any type other than boolean, the update statement fails in syntax. > If col1 is boolean, then it updated it correctly. In other words > update col1 = NULL > and col2 in (1,2) > is treated same as > update col1 = NULL > where col2 in (1,2) The above is not the same format as OP's query: Update tableA set col1 = null and col2 in (1,2); > > Also I checked it on DB2 which rejected the UPDATE sql as bad syntax, as expected. > > > > -- Adrian Klaver adrian.klaver@aklaver.com