Constraints not check indexes existence on creation.

From: Viacheslav N Tararin <taras(at)dekasoft(dot)com(dot)ua>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Constraints not check indexes existence on creation.
Date: 2003-02-12 10:47:49
Message-ID: 3E4A2655.90506@dekasoft.com.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2003-02-12 18:35:48 Bug #896: Column Constraint Not Working in ALTER TABLE ADD COLUMN?
Previous Message pgsql-bugs 2003-02-12 10:26:49 Bug #895: incorrect error message when duplicate index name