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 1i9WfH-0001r2-PA for pgsql-general@arkaria.postgresql.org; Sun, 15 Sep 2019 15:42:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9WfG-0008KC-IU for pgsql-general@arkaria.postgresql.org; Sun, 15 Sep 2019 15:42:14 +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 1i9WfE-0008Jt-Pr for pgsql-general@lists.postgresql.org; Sun, 15 Sep 2019 15:42:14 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9WfA-0005q1-C8 for pgsql-general@lists.postgresql.org; Sun, 15 Sep 2019 15:42:12 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id AD7D75E0; Sun, 15 Sep 2019 11:42:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 15 Sep 2019 11:42:04 -0400 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=fm3; bh=Y mZ/Rt3v/QG1tUX7gvAMpGxE0JsVYT7SsUNbj1qicxQ=; b=lNxKSZ1ROINxAKqum 488xhqVKrkRY7wLv7LBM5zpGcRQ+fg6Hte9IYaiDVENtq31c7zTxzE2TQO58ZQFd D2kPYGoE1YiRk6H8er5beU1DdMO+5/2BUkZmmSJS54uCQ1uJY6nXCb8f8mtrTPLU a3T7m2bHOq+pa9Jb9OJwBjKgFgRULfWN2VUYVCJ9+FDRKT1Z/jzIIHT/OSFJ0nrA IL6W2Xcib/V1j584mBFwxladanSSP3ZoPtJOTU4JMPgDkfFrJ6f45Xv3NFSzV9Zf m8DqQYsw6DyZPNQcLvydpw3q0rZjIK33xihTllSIPZVBbWfKDrJoi4FrUAj7n9sK u344w== 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=fm3; bh=YmZ/Rt3v/QG1tUX7gvAMpGxE0JsVYT7SsUNbj1qic xQ=; b=AhOshcaWlAHfs9Nb1ge9RKSrl2KIN/krORulkxDrCZL3WMG0yselvy8Kr 1MbK0kaF5PpBSDJGF+w4Wk+7C/LPVvPEfE1syBPB9l/20uyyGlG60zMUFtOYNr75 aAuMvS2d1gtv7Pduk8dpYP4yQhTH7OTAm2g/6foZcAHUTVdZ1LU28knDi5Ickcht Uuvjk++Xz8XL8U6zg+umvCMhdK7NDkcVGGw6zBBudx8osVCQ6ShldY9ohx7xKLLt z0+FfDCP9U4TzcoP5vh3qn+/AlgUKXG+n45jpM6mNE9PLeOCmDNK5LfAnvaGZ1ZV V22NCPEehN1xTzK/vOG89fi0dTeXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddugdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqh hlrdhorhhgnecukfhppedujeegrddvuddruddvledrudejheenucfrrghrrghmpehmrghi lhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.3] (174-21-129-175.tukw.qwest.net [174.21.129.175]) by mail.messagingengine.com (Postfix) with ESMTPA id 4500D8005C; Sun, 15 Sep 2019 11:42:03 -0400 (EDT) Subject: Re: Shouldn;t this trigger be called? To: stan , pgsql-general@lists.postgresql.org References: <20190915153309.GA19624@panix.com> From: Adrian Klaver Message-ID: <4e60c990-3361-5d9f-d125-ed580b5548fc@aklaver.com> Date: Sun, 15 Sep 2019 08:42:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190915153309.GA19624@panix.com> 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 9/15/19 8:33 AM, stan wrote: > I have defined this function: > > CREATE FUNCTION fix_customer_types_case() > > and this trigger: > > CREATE TRIGGER fix_customer_types_case_trig BEFORE INSERT OR UPDATE ON customer > FOR EACH ROW EXECUTE FUNCTION fix_customer_types_case(); > > and I put a RAISE NOTICE so I cna tell if the function is called. Yet when I > do a : > > \copy to bring data into this table, I do not see the notice. What is the actual command you are using? For more info see: https://www.postgresql.org/docs/11/sql-copy.html which is the command that is being used by \copy. > > Shouldn't this fucntion be aclled for that? > > > -- Adrian Klaver adrian.klaver@aklaver.com