Re: pg can create duplicated index without any errors even warnning

2019-08-05 Thread Tom Lane
Alex writes: > postgres=# create table t (a int, b int); > CREATE TABLE > postgres=# create index m on t(a); > CREATE INDEX > postgres=# create index m2 on t(a); > CREATE INDEX > is this by design? Yes. regards, tom lane

Re: pg can create duplicated index without any errors even warnning

2019-08-05 Thread Michael Paquier
On Mon, Aug 05, 2019 at 08:16:11PM -0700, Peter Geoghegan wrote: > Yes. Being able to do this is useful for several reasons. For example, > it's useful to be able to create a new, equivalent index before > dropping the original when the original is bloated. (You could use > REINDEX instead, but tha

Re: pg can create duplicated index without any errors even warnning

2019-08-05 Thread Peter Geoghegan
On Mon, Aug 5, 2019 at 7:34 PM Alex wrote: > is this by design? Yes. Being able to do this is useful for several reasons. For example, it's useful to be able to create a new, equivalent index before dropping the original when the original is bloated. (You could use REINDEX instead, but that has s

pg can create duplicated index without any errors even warnning

2019-08-05 Thread Alex
postgres=# create table t (a int, b int); CREATE TABLE postgres=# create index m on t(a); CREATE INDEX postgres=# create index m2 on t(a); CREATE INDEX postgres=# \d t Table "demo.t" Column | Type | Collation | Nullable | Default +-+---+--+--