Обсуждение: Create clustered index

Поиск
Список
Период
Сортировка

Create clustered index

От
Bartosz Dmytrak
Дата:
Hi,
I've tried to create clustered index on table, pgAdmin generated SQL:
CREATE INDEX 
   ON "Calc"."tblDBObjectsDefs" (fullname ASC NULLS LAST);
ALTER TABLE "Calc"."tblDBObjectsDefs" CLUSTER ON ;

Problem is that I tried to create unnamed index, to allow DB to name it. Because of that, ALTER TABLE statement is not valid (no index name after CLUSTER ON).

My suggestion is to disallow create clustered indexes when there is no explicit name given by the user.

Regards,
Bartek

Re: Create clustered index

От
Guillaume Lelarge
Дата:
On Wed, 2012-04-04 at 18:17 +0200, Bartosz Dmytrak wrote:
> Hi,
> I've tried to create clustered index on table, pgAdmin generated SQL:
> CREATE INDEX
>    ON "Calc"."tblDBObjectsDefs" (fullname ASC NULLS LAST);
> ALTER TABLE "Calc"."tblDBObjectsDefs" CLUSTER ON ;
> 
> Problem is that I tried to create unnamed index, to allow DB to name it.
> Because of that, ALTER TABLE statement is not valid (no index name after
> CLUSTER ON).
> 
> My suggestion is to disallow create clustered indexes when there is no
> explicit name given by the user.
> 

You're right about the issue. Your suggestion seems good to me. Bug
fixed according to your suggestion.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: Create clustered index

От
Guillaume Lelarge
Дата:
On Wed, 2012-04-04 at 22:53 +0200, Guillaume Lelarge wrote:
> On Wed, 2012-04-04 at 18:17 +0200, Bartosz Dmytrak wrote:
> > Hi,
> > I've tried to create clustered index on table, pgAdmin generated SQL:
> > CREATE INDEX
> >    ON "Calc"."tblDBObjectsDefs" (fullname ASC NULLS LAST);
> > ALTER TABLE "Calc"."tblDBObjectsDefs" CLUSTER ON ;
> > 
> > Problem is that I tried to create unnamed index, to allow DB to name it.
> > Because of that, ALTER TABLE statement is not valid (no index name after
> > CLUSTER ON).
> > 
> > My suggestion is to disallow create clustered indexes when there is no
> > explicit name given by the user.
> > 
> 
> You're right about the issue. Your suggestion seems good to me. Bug
> fixed according to your suggestion.
> 

BTW, thanks for your report.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com