Thread: BUG #1483: Index problem

BUG #1483: Index problem

From
"Zoltan Szmutku"
Date:
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

From
Bruno Wolff III
Date:
On Tue, Feb 15, 2005 at 12:38:17 +0000,
  Zoltan Szmutku <hargita@freemail.hu> 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?