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.96) (envelope-from ) id 1w2Ffo-0007ro-1l for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2026 21:40:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Ffn-00DLHp-0F for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2026 21:40:27 +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.96) (envelope-from ) id 1w2Ffm-00DLHh-2R for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2026 21:40:26 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2Ffj-000000004wx-1atV for pgsql-general@postgresql.org; Mon, 16 Mar 2026 21:40:25 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3DA921400220; Mon, 16 Mar 2026 17:40:24 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 16 Mar 2026 17:40:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=1773697224; x=1773783624; bh=fStJHJ+sgUvSkX2IQMyCv49tiyjlgtzEzHWLdIpuL2U=; b= Cej3BnuFQq4vNOXu2fTpmIIYRgovtLSAu5SeNcmx99JpqgVmU3U2ZARY3zTU/gQ9 eVlaFwF9Uq2MDv1FxgYrUlQOk6KMHFYHD3FSLNY0euvujDJJQqW2N0szka8E3ce+ nE5+OgD8S/3HgmKUXEO+pGBXNtMKMceNFLHnnbagDSOtcoxqlQQyRvX1Latq+VHv bQBzpi1tAQ9tww0N0WIEERcx5bJxc5KJUnjDRwvh68AABzG8MNdteYVDLLWynx9E 25TCE+T3rZlmLBBWg+I3ZXdk44XJ0IDzQe8Ulozonm0vQT03imvVMpXttnKt2dy2 W/ekmUCzoOFFrN+sJYXigQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1773697224; x= 1773783624; bh=fStJHJ+sgUvSkX2IQMyCv49tiyjlgtzEzHWLdIpuL2U=; b=g nRyBrLqs/oZdJ2Fq/Iip2gEl5zEIJ5cOAn9xQKO64ymdX2Dugwfu0BDiBuW0BfnF R1EdPlAidGziN7mpJNmXB/Lj+dareOHyjAu8Tu90U/XT7eg2asNZpS02Btzhn6pg EulcfA1a9AghBEbSxU60EoCVX24zlAA9W5mOKzmi5TawLTqia0pHjyfxlvu5h59g tVpD3ZdDQNHm2HrFFm0TM9wI04F8yP5V3p/v16hqODzymWfK62uwhjD42tmO5Y8C MaMixk3WQaZt9BAzDNlqdHAigL8C/4THf2Yi0eO/PEM33CVuq5SHiv7x9NtZNiuE GK3vndYXtO68NzfzS30JQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvleelgeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegouf hushhpvggtthffohhmrghinhculdegledmnecujfgurhepkfffgggfuffhvfevfhgjtgfg sehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirg hnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffdt vdehgeekhedugeegkefggfeiudetueduledtfffggeelheeigfeuteejgeelnecuffhomh grihhnpegsphgrrdhsthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsg gprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehikhhorhho thdtudesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlse hpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Mar 2026 17:40:21 -0400 (EDT) Message-ID: Date: Mon, 16 Mar 2026 14:40:20 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Does included columns part of the PK From: Adrian Klaver To: Igor Korot Cc: pgsql-general References: <3547f40b-08b9-4d0c-bba8-f1c26d0bf09d@aklaver.com> <2c31c118-7f8a-4359-9c4f-4cabd9df4262@aklaver.com> <7461c77a-4536-4f53-b951-99b9ca33db79@aklaver.com> <105a9d1a-c219-401a-9b81-4d77dde901f5@aklaver.com> Content-Language: en-US In-Reply-To: <105a9d1a-c219-401a-9b81-4d77dde901f5@aklaver.com> 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/16/26 2:30 PM, Adrian Klaver wrote: > On 3/16/26 11:47 AM, Igor Korot wrote: > > Reply to list also. > Ccing list. >> Adrian, >> >> >> >> On Mon, Mar 16, 2026, 8:03 AM Adrian Klaver > > wrote: >> >>     On 3/15/26 6:23 PM, Igor Korot wrote: >>      > Hi, Adrian, >>      > >>      > Here is the log file from running in ODBC mode: https://bpa.st/ >>     Z2DWG >> >>     I have no idea what this is trying to show? >> >> >> The log shows ODBC connection and then at the end - call to >> SQLPrimaryKeys(). > > Where? > > I don't see that in either the link you posted or the text file Greg > sent to the list. > >> >> If you run it against the table I posted above, you will get 3 fields. >> Whereas it should be just one. > > Again, run it how? Alright I see what you are talking about now. I'm not using the ODBC driver just it's query. In psql : CREATE TABLE leagues_new ( id serial, name varchar(100), drafttype smallint, scoringtype smallint, roundvalues smallint, leaguetype char(5), salary integer, benchplayers smallint, PRIMARY KEY (id) INCLUDE (drafttype, scoringtype ) WITH (fillfactor = 50, deduplicate_items = OFF) ); SELECT ta.attname, ia.attnum, ic.relname, n.nspname, tc.relname FROM pg_catalog.pg_attribute ta, pg_catalog.pg_attribute ia, pg_catalog.pg_class tc, pg_catalog.pg_index i, pg_catalog.pg_namespace n, pg_catalog.pg_class ic WHERE tc.relname = 'leagues_new' AND n.nspname = 'public' AND tc.oid = i.indrelid AND n.oid = tc.relnamespace AND i.indisprimary = 't' AND ia.attrelid = i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum = i.indkey[ia.attnum - 1] AND (NOT ta.attisdropped) AND (NOT ia.attisdropped) AND ic.oid = i.indexrelid ORDER BY ia.attnum; yields attname | attnum | relname | nspname | relname -------------+--------+------------------+---------+------------- id | 1 | leagues_new_pkey | public | leagues_new drafttype | 2 | leagues_new_pkey | public | leagues_new scoringtype | 3 | leagues_new_pkey | public | leagues_new > >> >> Thank you. >> -- Adrian Klaver adrian.klaver@aklaver.com