From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: aglushkov@shakuro.com
Subject: BUG #15878: Changing two column types in single request raises error that index already exists.
Date: Thu, 27 Jun 2019 07:10:12 +0000
Message-ID: <15878-376cf74cd44eac2b@postgresql.org> (raw)
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=#
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, aglushkov@shakuro.com
Subject: Re: BUG #15878: Changing two column types in single request raises error that index already exists.
In-Reply-To: <15878-376cf74cd44eac2b@postgresql.org>
References: <15878-376cf74cd44eac2b@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox