From: | Puneet Sharma <puneet(dot)orcl(at)gmail(dot)com> |
---|---|
To: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17189: Index not created when primary key created |
Date: | 2021-09-21 10:49:10 |
Message-ID: | CALETbT81vP3vvm95jkeS_ouyVWG1FO60ONf-zgRe59aa0QiC8w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks a lot,
Ok, I will check.
On Tue, 21 Sep 2021 at 1:53 PM, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
wrote:
> 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
>
--
Regards
Puneet Kumar
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2021-09-21 12:52:14 | BUG #17199: Calling stored procedure with stable function as argument results in wrong result |
Previous Message | Jaime Casanova | 2021-09-21 08:23:48 | Re: BUG #17189: Index not created when primary key created |