Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSb4I-0000Ju-31 for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Sep 2021 08:23:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSb4H-00015I-1w for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Sep 2021 08:23:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSb4G-00015A-NK for pgsql-bugs@lists.postgresql.org; Tue, 21 Sep 2021 08:23:56 +0000 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mSb4E-0002bB-6k for pgsql-bugs@lists.postgresql.org; Tue, 21 Sep 2021 08:23:56 +0000 Received: by mail-qv1-xf2f.google.com with SMTP id 93so12986898qva.7 for ; Tue, 21 Sep 2021 01:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemguards-com-ec.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vCjaDxzZI3y3Q+pSufQ+sD2wUjrjPfqfLt1GWpBZVXI=; b=j4QgdZYFa1JH2TVzGEmWtObi+w1+u5TATmPOKnwy/qE4S1/4PWgsdnjCLxOiT6Nyy0 J1cl7SB4FBsCAHr4n283VIvQTOxRKKyJ9fwri68lDrSX+MoQetdsd0dKiaZtOoC179AN kwD5B7in6reHPHw3UpydtmUR05vRdmQefmFD+VGwIw4mvMKfESl5X/ve13mYJzGwB/jz ct7V81F6BdqJSRVqzGqQzar2q/xujw51WevEoKgJRjqLoiUrQNu1z5RWzfvR7CV92hGi ZIH5DFgSb1PxkCZHLZL3+AWV5YCl8kYQIR29dyQj9UN+xDvowDU8KCzA8CoWQkbAFuSw zO5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vCjaDxzZI3y3Q+pSufQ+sD2wUjrjPfqfLt1GWpBZVXI=; b=kLF5LYfkILd64hqtUBzYt7UFhLCNSwbzJztCrcIX+JkAJmN6fUWDqk2g0ngh8LClDW +uiLQdvDnuAy/BbkRfZHyoPF17FngKm4XuxyFOR/smoKApGDPPDlrVCUFGh8dk9lacTC 34DKPHErnuNRYbI2Q5LZVf0lvAvJPM8lTrmcyDy/NJ8PS4ejqQbTcReGf2WG5hvaaKl2 wBvVFKNeFMwMJ9Eh6IlA7D0u8wm51LgNCk0qg+KQd6XYZr5HHgaBPFZzKx9B+22YpXLs Jb9o0qwEPsqN+q2z5603ug6pDfOQze1G4NqcDeig/nFaJanT7qV14cEIVPxF49DUxq4v 40OA== X-Gm-Message-State: AOAM533m58d/DwLFc/ICdnWQMss2C3icMMltj7Odts2cttDHeGsWB6XJ /G4wWTmWDyUUx9W0fSPZ+gVXyQ== X-Google-Smtp-Source: ABdhPJwMcx5n60BLAanNUHRf9cq0fjvfJnvNVvSG9ICXZMshJYxRndDpGwqJSOA+umz0/Igi1DKfDQ== X-Received: by 2002:ad4:476a:: with SMTP id d10mr9891498qvx.59.1632212632539; Tue, 21 Sep 2021 01:23:52 -0700 (PDT) Received: from ahch-to ([201.183.0.184]) by smtp.gmail.com with ESMTPSA id m5sm13391403qkn.33.2021.09.21.01.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 01:23:52 -0700 (PDT) Date: Tue, 21 Sep 2021 03:23:48 -0500 From: Jaime Casanova To: Puneet Sharma Cc: "David G. Johnston" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #17189: Index not created when primary key created Message-ID: <20210921082348.GA12405@ahch-to> References: <17189-521a1b29d9727929@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Sep 21, 2021 at 11:34:37AM +0530, Puneet Sharma wrote: > Hi David, > > Is it different from postgres 12 version and postgres 12.8 version. > > When we are creating composite primary key default constraint has been > created but not index like oracle. > no, it's not different. """ postgres=# select version(); version ---------------------------------------------------------------------------------------- PostgreSQL 12.0 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit (1 row) postgres=# create table t1(a int, b int, c int, primary key (a,b,c)); CREATE TABLE postgres=# select indexrelid::regclass::text from pg_index postgres-# where indrelid = 't1'::regclass and indisprimary; indexrelid ------------ t1_pkey (1 row) """ this has worked the right way for a long time, I would even say more than 20 years. It's not suddenly failing. As Hubert asked, please provide the output of `\d table_name`, or maybe execute this query: """ select indexrelid::regclass::text from pg_index where indrelid = 'table_name'::regclass and indisprimary; """ -- Jaime Casanova Director de Servicios Profesionales SystemGuards - Consultores de PostgreSQL