BUG #15878: Changing two column types in single request raises error that index already exists. - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15878: Changing two column types in single request raises error that index already exists.
Date
Msg-id 15878-376cf74cd44eac2b@postgresql.org
Whole thread Raw
Responses Re: BUG #15878: Changing two column types in single request raises error that index already exists.
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15878
Logged by:          Andrey Glushkov
Email address:      aglushkov@shakuro.com
PostgreSQL version: 11.4
Operating system:   Ubuntu 18.04.2 LTS
Description:

psql -U postgres
psql (11.4 (Ubuntu 11.4-1.pgdg18.04+1))
Type "help" for help.

postgres=# CREATE DATABASE test_database;
CREATE DATABASE
postgres=# \c test_database
You are now connected to database "test_database" as user "postgres".
test_database=# 
test_database=# CREATE TABLE comments(
test_database(#   weight integer,
test_database(#   is_question boolean
test_database(# );
CREATE TABLE
test_database=# 
test_database=# CREATE INDEX index_comments_on_weight ON comments USING
btree (weight);
CREATE INDEX
test_database=# CREATE INDEX index_comments_on_is_question ON comments USING
btree (is_question);
CREATE INDEX
test_database=# 
test_database=# \set VERBOSITY verbose
test_database=# 
test_database=# ALTER TABLE "comments"
test_database-#   ALTER COLUMN "weight" TYPE integer,
test_database-#   ALTER COLUMN "is_question" TYPE boolean;
ERROR:  42P07: relation "index_comments_on_weight" already exists
LOCATION:  index_create, index.c:877
test_database=#


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15877: Cannot CREATE EXTENSION for postgis 2.4 because of missing gdal23-libs ldconfig path
Next
From: Sergei Kornilov
Date:
Subject: Re: BUG #15878: Changing two column types in single request raises error that index already exists.