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 1tsl45-005Jbn-Qi for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 16:05:45 +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 1tsl43-00H6n5-O0 for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 16:05:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsl43-00H6mx-Ca for pgsql-general@lists.postgresql.org; Thu, 13 Mar 2025 16:05:43 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsl3z-002g21-1k for pgsql-general@postgresql.org; Thu, 13 Mar 2025 16:05:43 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id 25A861383162; Thu, 13 Mar 2025 12:05:39 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Thu, 13 Mar 2025 12:05:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1741881939; x=1741968339; bh=IveTwYRkdO9ovjnp6xzqBYKOewZ8/updOJ1bdwC6G98=; b= Q7/BLZlxwpntDJoaARcFQSwEQ9xzQWVaIEofWjh+Lf9M/vgIT4XABL9QGepCamPo urtJj+iq2hCcw6k9aq2LF0DcKBWGYtAOQKs+s7MS6E+8XTQh/WoCcR71q6ghLAiT Ib/JAbTpt08B4hvYQl4VjqjMRaczaU+yeCtl22XeaMATE2r8vD+XWxwVoimalz+u luxZIex02tsYzVlz6zKyUWl3X1oQmIgLse35W3JPxUQJmeOlvf+AMbzlfyBoeCI7 RD5bYVUtQdJDkpIURpDDwTEQmJLFLVWr+eckDPjiuwxG9xJJ8mBiOKc3j4jpaZKh wlGS/8Ndj1EQceTeZF47SA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741881939; x=1741968339; bh=I veTwYRkdO9ovjnp6xzqBYKOewZ8/updOJ1bdwC6G98=; b=6F7y3JNaSnZZb/4wb xKvG+RSHi/4PZ+gO9b+TV7Hxu6zYUmF6b2ska9kZWNFHp1c4av7lEpsN/SjL1mtP +kW7p7BZAEUcHPiWKcer7QoGKM38Lt/2CKQXXsSrr5le+RTRQeP13OF41CtXF1Yh OnbyKKqq4vaLcKJkHGtIbAAd9IVq8Fue87WtYFmY0drueywUXPpSKbeaaMHZL8EE glm7pTbTNuc4xYvbFclOW9DoxDnV9f4SV4URvf6yxtcr5kyjz4dYARwKNxtxFikU S1DBCXc7+0H00DZE69Cx5nH3Khb5E55K6he5xgmIRK1voiWgXb2ZzizysmO9AtvL pbNQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdekfeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff ggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghv vghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrf grthhtvghrnhepkeeivedtvefghfejueefgefgieetfeeljeevuefhtdefueegiefgieeg jeffuefhnecuffhomhgrihhnpegprghmrgiiohhnrdgtohhmpdgrmhgriihonhdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopeefpd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehmrghrkhgsrhgrugihjhhusehouhht lhhoohhkrdgtohhmpdhrtghpthhtoheprhhonhhljhhohhhnshhonhhjrhesghhmrghilh drtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhq lhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Mar 2025 12:05:38 -0400 (EDT) Message-ID: Date: Thu, 13 Mar 2025 09:05:37 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Duplicate Key Values To: mark bradley , Ron Johnson , pgsql-general References: <84aac7bf-5638-4f1f-9772-ace0ea27e848@aklaver.com> <9203d0df-0ddd-4564-a985-59bcfcf1d294@aklaver.com> <08c96195-3d5f-4902-b5d7-15916a02e23f@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/13/25 08:56, mark bradley wrote: > >Postgresql does not assume / default to inheritance.  In text-mode > clients where you type >in "raw" SQL, you have to explicitly add an > explicit "INHERITS " clause to the >"CREATE TABLE foo" > statement. > > >Are you creating the tables via PgAdmin point-and-click? > > I am using PgAdmin 4 v9.1. > > I think the problem may also be related to the fact that I had > *node_id* and *node_type *were in both tables from an earlier design and > Postgres would not let me delete* node_type* from the* dataset* table. Because it was inherited: create table node (node_id integer primary key, fld1 varchar); create table node_1 (node_id integer primary key, node_1_fld boolean) inherits ( node); alter table node_1 drop column fld1; ERROR: cannot drop inherited column "fld1" > > As an experiment, I created a simple version of the same tables from > scratch without *node_type* in the *dataset* table.  So far, no dups are > appearing. I'm assuming that by 'simple version' you mean no inheritance. > > Best regards, > Mark Brady > _amazon.com/author/markjbrady _ > ------------------------------------------------------------------------ -- Adrian Klaver adrian.klaver@aklaver.com