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 1i9x6J-0005w8-0K for pgsql-general@arkaria.postgresql.org; Mon, 16 Sep 2019 19:55:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9x6H-0003I1-Hs for pgsql-general@arkaria.postgresql.org; Mon, 16 Sep 2019 19:55:53 +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 1i9x6H-0003Hs-5S for pgsql-general@lists.postgresql.org; Mon, 16 Sep 2019 19:55:53 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9x6A-0003iQ-17 for pgsql-general@lists.postgresql.org; Mon, 16 Sep 2019 19:55:52 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46XH6S0tynz1XW4; Mon, 16 Sep 2019 15:55:43 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46XH6R6FRBz1ZVV; Mon, 16 Sep 2019 15:55:43 -0400 (EDT) Date: Mon, 16 Sep 2019 15:55:43 -0400 From: stan To: Adrian Klaver Cc: pgsql-general@lists.postgresql.org Subject: Re: FW: Re: FW: Re: Shouldn;t this trigger be called? Message-ID: <20190916195543.GA16882@panix.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 */ CREATE TABLE customer ( customer_key integer DEFAULT nextval('customer_key_serial') PRIMARY KEY , cust_no smallint NOT NULL UNIQUE , name varchar UNIQUE , c_type customer_type , location varchar , bill_address_1 varchar , bill_address_2 varchar , bill_city varchar , bill_state varchar(2) , bill_zip us_postal_code NOT NULL DEFAULT '00000', bill_country varchar , bill_attention varchar , bill_addresse varchar , ship_address_1 varchar , ship_address_2 varchar , ship_addresse varchar , ship_attention varchar , ship_city varchar , ship_state varchar(2) , ship_zip us_postal_code NOT NULL DEFAULT '00000', office_phone_area_code numeric(3), office_phone_exchange numeric(3), office_phone_number numeric(4), office_phone_extension numeric(4), cell_phone_area_code numeric(3), cell_phone_exchange numeric(3), cell_phone_number numeric(4), ship_phone_area_code numeric(3), ship_phone_exchange numeric(3), ship_phone_number numeric(4), ship_phone_extension numeric(4), fax_phone_area_code numeric(3), fax_phone_exchange numeric(3), fax_phone_number numeric(4), 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? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin