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 1i9zLK-0004Lg-1g for pgsql-general@arkaria.postgresql.org; Mon, 16 Sep 2019 22:19:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9zLI-0004l3-MK for pgsql-general@arkaria.postgresql.org; Mon, 16 Sep 2019 22:19:32 +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 1i9zLI-0004km-CK for pgsql-general@lists.postgresql.org; Mon, 16 Sep 2019 22:19:32 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9zLG-00052F-9p for pgsql-general@lists.postgresql.org; Mon, 16 Sep 2019 22:19:32 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 027A12134B; Mon, 16 Sep 2019 18:19:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 16 Sep 2019 18:19:29 -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=fm1; bh=c U7UijJAAzhAFj5GaL2rndUyfAhMVdOhQkwHW5g3YRw=; b=hmjo8IF/r4tBGxFmo MIzFUuAXfBXCM/qnJLwoJ0KdsPfBP4t/Tgcs7nIdLTPpWY48nVGfFpweMuT25KXi y+2Afd2n5uLa/V4amfJf1wwuREYoNe2WJydHArYJj6efTOGaGl/FdAK0vzjPiNWP PnD6l9OTddIdZs4I4b2Ld46VqiQWbC9w13WDc0PxgUPzoZ4RppPNI7JxOxzNa/mZ 8U00Bu0z5AddeM1e5Q/0J/2ZPNlOBILN2OwE99pc1XUrKffNl4+iDIBC9D6V3q96 04IBu26Z4kH/gw9s933bqS9SK4wZ9+qjGWKJfHXJlvRUjGDBvFZjpNuryDrehdqr 4ttpg== 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=fm3; bh=cU7UijJAAzhAFj5GaL2rndUyfAhMVdOhQkwHW5g3Y Rw=; b=E8asmCw0V900Lw9wXC6fLrXcslF0lwoOkZSUfB+FzglX9bkJ0qd+qrF1i 9hcS59TyeEfOicwBjjG9u1vVWUC/EsJ1DQea6hVDFYle5byEqXv/73pnRXBRh89z ublFff7wvlcZcsRtFos5SgLBz3f0CXonYGMvca6BeA+EOfOyYDZZ0xbhozDmgb+k UyQp/h3vmkHuTGK9oJ6uZrzhau09G4G0x30R5ZMkm2LLHO3eb0Zn1NW90DM3PWcu 3sqR3V1PY53DbWvObNXy85dP4WdMNVdqDy/t5p3cxsSGM0TsTF9TMTYPUesOgDoU YlzUt+/wkQ9fYZHd7HAu+fzNO5f8Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeggddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucfkphephedtrdduleejrdektddrvdenuc frrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgv rhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from ranger.suse (50-197-80-2-static.hfc.comcastbusiness.net [50.197.80.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 589F2D6005D; Mon, 16 Sep 2019 18:19:28 -0400 (EDT) Subject: Re: FW: Re: FW: Re: Shouldn;t this trigger be called? To: stan Cc: pgsql-general@lists.postgresql.org References: <20190915174649.GB2078@panix.com> <50d5b256-74b9-1949-a634-0df37cbfb783@aklaver.com> <20190916010439.GA7478@panix.com> <11b4428d-8740-07f4-a053-37f0bb0cd2fb@aklaver.com> <20190916185333.GB28966@panix.com> <20190916195543.GA16882@panix.com> From: Adrian Klaver Message-ID: <4b1da094-8342-6415-e0a4-ce87fd1331ab@aklaver.com> Date: Mon, 16 Sep 2019 15:19:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190916195543.GA16882@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/16/19 12:55 PM, stan wrote: > > On Mon, Sep 16, 2019 at 12:44:49PM -0700, Adrian Klaver wrote: >> On 9/16/19 11:53 AM, stan wrote: >>> On Sun, Sep 15, 2019 at 09:16:35PM -0700, Adrian Klaver wrote: >>>> On 9/15/19 6:04 PM, stan wrote: >>>>> On Sun, Sep 15, 2019 at 12:27:14PM -0700, Adrian Klaver wrote: >>>>>> On 9/15/19 10:46 AM, stan wrote: >>>>>>> Forgot to cc the list again. Have to look at settings in mutt. >>>>>>> >>>>>>>>>> >>>> >>>>>> What validity check? >>>>>> >>>>> >>>>> The check to see if it is the type enum. >>>>> >>>> >>>> This would get solved a lot quicker if full information was provided: >>>> >>>> 1) Schema of the table. >>>> Including associated triggers >>>> >>>> 2) The actual check code. >>>> >>> >>> OK, please let me know if what I put in my reply to Tom Lane is not sufficient. >>> >> >> >> It was not sufficient, you did not include the table schema or the check >> code. > > OK, understood here is the table: > > /* Contains one record for each customer */ > > status activity_status NOT NULL DEFAULT 'ACTIVE', > modtime timestamptz NOT NULL DEFAULT current_timestamp > ); > > I am not certain what you mean by the check. As you can see, there is nor > specific check clause. I was referring to the built in check of data being > entered versus the legal values for the user defined type. Make sense? > To be clear you are seeing an error because a value of say 'active' is being rejected before your trigger has a chance to upper case it, correct? Also this happens whether you use \copy or manually INSERT the values? -- Adrian Klaver adrian.klaver@aklaver.com