Re: Index name different from constraint name
| От | Stephen Frost |
|---|---|
| Тема | Re: Index name different from constraint name |
| Дата | |
| Msg-id | 20051026161457.GU6026@ns.snowman.net обсуждение исходный текст |
| Ответ на | Re: Index name different from constraint name (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Index name different from constraint name
|
| Список | pgsql-bugs |
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > test=3D> create table a (
> > test(> b int primary key
> > test(> );
> > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey"=
for=3D
> > table "a"
> > CREATE TABLE
> > test=3D> alter table a rename to c;
> > ALTER TABLE
> > test=3D> alter index a_pkey rename to c_pkey;
> > ALTER INDEX
>=20
> Arguably we should forbid ALTER INDEX RENAME on an index that belongs to
> a constraint, and make you rename the constraint instead (and have that
> implicitly change the index name too).
That would work too, though I don't think you can just rename a
constraint. You have to drop/add it, which means dropping and then
adding the index back it looks like, which kind of sucks if it's a big
table (one reason I wasn't just dropping/recreating the table in the
first place). This was on 8.0.3; can you rename constraints w/ 8.1? If
so, and if that's made to implicitly change the index name, I'd be
happy.
Thanks,
Stephen
В списке pgsql-bugs по дате отправления: