Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb9MS-00BEWM-1N for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Aug 2023 00:47:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qb9MQ-00D3em-Pc for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Aug 2023 00:47:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb9MQ-00D3eG-DW for pgsql-hackers@lists.postgresql.org; Wed, 30 Aug 2023 00:47:06 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qb9MN-001gzk-1K for pgsql-hackers@lists.postgresql.org; Wed, 30 Aug 2023 00:47:04 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-56f84dd2079so2481169a12.1 for ; Tue, 29 Aug 2023 17:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693356421; x=1693961221; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=an1UcV+6uzGsYmyC1OhVou2JmKjckO4q43r2hYS34mI=; b=MxQ8pz5fZ6HksJAgIch6al/aomWRkC2XDqciQcNUiwf6o+4fwKwttamqN9u1f5PeEH 8pnxD0LDNS17vQwLdTK1EfB8/1XVcQJF5NKqKDho7fNsKbhLAE/81J4N2MeBK8QDc/ah mAgsVBMdmta6DkfqymBGmafrEvy00lrS8z6oYKaU3kSzjd9bf3o9lA6LidcTgtoLIx50 ctp0jKClnW961TEcHp+KPsvpEETz+eLs2SWGhF26EIJJTq+A2QVyEtS7QGEsI77i3Iat pbklnq0/LeDCaGTVtm6uTV/mWCt3jYlv1h5m/fVAi9nNDkUSFzLiLskAO068NLg5lETz TgIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693356421; x=1693961221; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=an1UcV+6uzGsYmyC1OhVou2JmKjckO4q43r2hYS34mI=; b=dVc9OCB/F2jDSsD1iOX7JUimc4Xv75W+GCH9okXqcVpt6RMfCv5UxQtzJyilZlirXb xb66oZK8e1tTaWirPhj6kNBY6xoOUBM88vVfluEZplXKLKmJ9GUojJtIIbLYIXHHFH5m 2FJxlrlQtuntQv+xsfmNxCfHPAqfU4RQOYUHBFuuPijsZuCW1TlgXzkiD2Z3kAQSeVZf yCreAHE8bTsDTQcSnQpCjX8xR1w8p5VCIaRdpiLff5CqqulRmj4mf0HO8uwU1X1CTqlx 5sbX0Kj51QJ2J2Jp4Qpfm2r5/6XAPbmjtyj7zXahxDOAuK8TVV0/2recS2z4ZX3Q0mpA FjTw== X-Gm-Message-State: AOJu0YyxnATDBUD93Tdk6fn5EmelPuH8c0NEnt0RBIcT3I84c2jJOYT+ P9MdsePd+/UWR1HhUdEFG6U= X-Google-Smtp-Source: AGHT+IGXct71wwpqdXoLSqKo1ksLgsx2a2flVa6tTfou6+o48zaI0BxCVEELUKDxkr3nhkH7KFVJhQ== X-Received: by 2002:a17:90b:4b01:b0:26d:418e:7074 with SMTP id lx1-20020a17090b4b0100b0026d418e7074mr753657pjb.15.1693356421487; Tue, 29 Aug 2023 17:47:01 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id 23-20020a17090a1a1700b0026fb228fafasm192094pjk.18.2023.08.29.17.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 17:47:00 -0700 (PDT) Date: Wed, 30 Aug 2023 09:46:58 +0900 (JST) Message-Id: <20230830.094658.631998719913738330.horikyota.ntt@gmail.com> To: alvherre@alvh.no-ip.org Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Strange presentaion related to inheritance in \d+ From: Kyotaro Horiguchi In-Reply-To: <20230829172828.5qi2pfbladvfgvsg@alvherre.pgsql> References: <20230829.135334.377739201526442411.horikyota.ntt@gmail.com> <20230829172828.5qi2pfbladvfgvsg@alvherre.pgsql> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Tue, 29 Aug 2023 19:28:28 +0200, Alvaro Herrera wrote in > On 2023-Aug-29, Kyotaro Horiguchi wrote: > > > Attached is the initial version of the patch. It prevents "CREATE > > TABLE" from executing if there is an inconsisntent not-null > > constraint. Also I noticed that "ALTER TABLE t ADD NOT NULL c NO > > INHERIT" silently ignores the "NO INHERIT" part and fixed it. > > Great, thank you. I pushed it after modifying it a bit -- instead of > throwing the error in MergeAttributes, I did it in > AddRelationNotNullConstraints(). It seems cleaner this way, mostly > because we already have to match these two constraints there. (I guess I agree that it is cleaner. > you could argue that we waste catalog-insertion work before the error is > reported and the whole thing is aborted; but I don't think this is a > serious problem in practice.) Given the rarity and the speed required, I agree that early-catching is not that crucial here. Thanks for clearing that up. regardes. -- Kyotaro Horiguchi NTT Open Source Software Center