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.92) (envelope-from ) id 1j6dTV-00056p-4p for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 16:54:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j6dTT-0001oN-O1 for pgsql-general@arkaria.postgresql.org; Tue, 25 Feb 2020 16:54:23 +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 1j6dTR-0001oG-L8 for pgsql-general@lists.postgresql.org; Tue, 25 Feb 2020 16:54:23 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j6dTI-0006RV-Tx for pgsql-general@postgresql.org; Tue, 25 Feb 2020 16:54:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2E1A021FE5; Tue, 25 Feb 2020 11:54:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 25 Feb 2020 11:54:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=c SQv6FuWkeCghEytnC8CO4RYjix4CtqxFAyyorqAJd8=; b=cmqm69NHR7uq114me TdaewmXPN5KaGBCe1UVw+IrE4jrZCtZArHstBqwH0+aFmTpnNid/nJYWMPTOxuqe 1sVOwIpveITLvQdfxAkGvefFytPgvmqyKQ7thvJFWcn2002MX3jLyOD8zysljihf cuMQ5WJosHaXqXxeuov2ccuWYZNB1gMFMl+uJwRpjDBX5pEJ9DJfVz2RXVF9NLve igDDnUqRHBPq3pVlYpDxDPi/tJztT6h7Z7janwhgh+kjBDXP+tNug8r8+zeWnt96 3dYYBvBZ93CLY2X+aNvjxCgHYeqeRiTTby8BzGeNBeB4wq4wzbkDSuJ7AnfcLaLW yK5QQ== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=cSQv6FuWkeCghEytnC8CO4RYjix4CtqxFAyyorqAJ d8=; b=A1ixdLygIFk/neAsHmLMXPtwpRFphb0ddap4U1uOsWvbJC5oqBkBDRqlm tsq60HXbOB2ipO26zdnRj2WK6+st3YUcu5gWa9SxnWosyI5EXZkl/KmIMZUGuGhs Bc77L3zEJGGBlJ0/C0QjK6UadhtUV06msarMhtf9w9na8IAezmQFUTTU8OvN+hKz V1Z0tQwro/xaeTr/9I4GIy+kGMxj6I5nYrbRnpSNJ2U0i4Ezc6IT21eR1C8hTV+S 0UuqX4M6Gomq8Dhs0QoRCqt13x/fMx0JuIacByCPJCwi98n9ZGrvQaCDJlCbn32Y ejMaoj/gqIIdYIxTU9l2Rp4mxYNyw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrledvgdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecukfhppeejuddrvdduvddruddvledrudelfeenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrg hvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 6B1443280059; Tue, 25 Feb 2020 11:54:00 -0500 (EST) Subject: Re: Trigger To: Sonam Sharma , pgsql-general References: From: Adrian Klaver Message-ID: <0b2c9168-01ef-e54b-fb46-9bedfbe179bd@aklaver.com> Date: Tue, 25 Feb 2020 08:53:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/25/20 12:01 AM, Sonam Sharma wrote: > I have a trigger, like many other triggers that fire after > > update and checks a field of the OLD set. For some reason this trigger > throw this error: > > ERROR: record "old" has no field "ivo_sts_cd" CONTEXT: SQL statement > if exc_count = 0 then > > UPDATE pps.T8071_CAI_IVO_HDR SET IVO_STS_CD = 1 where > T616_VBU_NBR=old.T616_VBU_NBR and T617_FNC_TYP_CD=old.T617_FNC_TYP_CD and > > T8071_CAI_IVO_ID=old.T8071_CAI_IVO_ID and T8071_ADD_DM= old. > T8071_ADD_DM and old.ivo_sts_cd != 10 and old.ivo_sts_cd != 3; Realized I went through the above to quickly. I do not see a SET, nor am I clear what table you are trying to UPDATE. > > end if; > > RETURN NEW; > > END > > $function$; > > > Can someone please help where I am missing .. > > > Thanks, > > Sonam > -- Adrian Klaver adrian.klaver@aklaver.com