Constraints not check indexes existence on creation. - Mailing list pgsql-bugs

From Viacheslav N Tararin
Subject Constraints not check indexes existence on creation.
Date
Msg-id 3E4A2655.90506@dekasoft.com.ua
Whole thread Raw
Responses Re: Constraints not check indexes existence on creation.
List pgsql-bugs
Hi.

--- Next sequence of commans: ---

CREATE TABLE CURRENCY.CURRENCY (
ID                   integer       NOT NULL,
CODE                 varchar(17)   NOT NULL,
DESCRIPTION          text,
PRINT_SYMBOL         VARCHAR(17)   NOT NULL,
VERSION              smallint
);

create unique index PK_CURRENCY_IDX         on CURRENCY.CURRENCY(ID);
create unique index AK_CODE_CURRENCY_IDX    on CURRENCY.CURRENCY(CODE);

alter table CURRENCY.CURRENCY add constraint PK_CURRENCY primary key (ID);
alter table CURRENCY.CURRENCY add constraint AK_CODE_CURRENCY unique (CODE);


--- Produse next table ---

\d currency.currency
            Table "currency.currency"
    Column    |         Type          | Modifiers
--------------+-----------------------+-----------
 id           | integer               | not null
 code         | character varying(17) | not null
 description  | text                  |
 print_symbol | character varying(17) | not null
 version      | smallint              |
Indexes: pk_currency primary key btree (id),
         ak_code_currency unique btree (code),
         ak_code_currency_idx unique btree (code),
         pk_currency_idx unique btree (id)

Why alter table commands not check index existence?
My indexes with _idx postfix similar implicit indexes.
Now it's not problem, but with tablespaces current implementation
restrict me to put indexes in separate tablespace.

Thanks.

pgsql-bugs by date:

Previous
From: Vicki Brown
Date:
Subject: discrepancy between "make check" output and documentation
Next
From: Bruno Wolff III
Date:
Subject: Re: cvs (7/2/2003) broken?