BUG #1483: Index problem

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

BUG #1483: Index problem

От:
"Zoltan Szmutku" <hargita@freemail.hu>
Дата:
The following bug has been logged online:

Bug reference:      1483
Logged by:          Zoltan Szmutku
Email address:      hargita@freemail.hu
PostgreSQL version: 8.01
Operating system:   Win 2000
Description:        Index problem
Details: 

Hello,

I now try first the PostgreSql. Before I use the MySQL but, for my new works
I need use the advanced transactions handle.
 
I have 2 tables : 'proba' and 'proba2' . 

My next commands : 

1.
CREATE UNIQUE INDEX kod
  ON proba
  USING btree
  (mezo1)

2.
CREATE UNIQUE INDEX kod
  ON proba2
  USING btree
  (mezo1)

The second command not success, I get the error message :

ERROR:  relation "kod" already exists

Why ? 

Thanks : Zoltan

Re: BUG #1483: Index problem

От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Tue, Feb 15, 2005 at 12:38:17 +0000,
  Zoltan Szmutku  wrote:
> 
> My next commands : 
> 
> 1.
> CREATE UNIQUE INDEX kod
>   ON proba
>   USING btree
>   (mezo1)
> 
> 2.
> CREATE UNIQUE INDEX kod
>   ON proba2
>   USING btree
>   (mezo1)
> 
> The second command not success, I get the error message :
> 
> ERROR:  relation "kod" already exists
> 
> Why ? 

Because you tried to name both indexes the same name. Perhaps you might
use something like proba_kod and proba2_kod?
FAQ